WASHINGTON — Democratic senators running for re-election in Trump Country face an agonizing choice over President Trump’s coming Supreme Court nominee: Vote to confirm the pick and risk demoralizing Democratic voters ahead of the midterm elections, or stick with the party and possibly sacrifice their own seats — and any chance at a Democratic majority in 2019.

The actions of a handful of Senate Democrats struggling to hold their seats in red states where Mr. Trump remains popular — notably Heidi Heitkamp of North Dakota, Joe Donnelly of Indiana and Joe Manchin III of West Virginia — will have broad implications for the party at a critical political juncture.

A decision by one or all of them to try to bolster their standing with Republican-leaning voters in their states by backing the president’s nominee would undermine Democratic leaders as they try to sustain party unity. And if their votes put the president’s choice on the court, it could hasten the move to the left by the party’s aggressive activist core, while intensifying the clamor for new, more confrontational leadership.

But if they hold together on a “no” vote, those senators could not only surrender their own seats, but by expanding the Republican majority, they could also narrow the path of Democrats to a Senate majority for years to come by ceding those states to Republicans.