Mr. Dent said “pragmatic Republicans” such as himself and Mr. Corker are being pushed aside in Washington by extreme forces in both parties who diminish the appeal of serving in Congress.

“You don’t want Washington to be just a lot of heavily ideological members,” Mr. Dent said. “When people like Corker and I leave, it is not helpful.”

Democrats feel the same way. Many expressed real disappointment at Mr. Corker’s decision and praised his willingness to work with them on foreign policy and other issues.

“He is a conservative Republican, but I have found him a terrific partner to legislate with on areas where we agree,” said Senator Chris Coons, Democrat of Delaware, who serves on the Foreign Relations Committee led by Mr. Corker.

“It is harder and harder for those who are willing to risk bipartisanship, craft legislation and do the hard work of compromise to be successful here,” Mr. Coons said. “And that’s a trend we all have to push back against.”

It was just a few weeks ago that discussions between Mr. Trump and Democratic leaders in Congress on spending, the debt limit and immigration spurred renewed talk of real bipartisanship.

Mr. Trump on Wednesday left the door open to negotiations with Democrats on health care, though he also continued to press for repeal of the Affordable Care Act, a position Democrats have ruled out. Even if Democrats and Mr. Trump come to some agreement on health care, it is uncertain that Republicans — battered by their base over a failure to repeal the health care law — would support it despite presidential backing. Mr. Trump’s endorsement did not protect Mr. Strange from a bad loss in the Alabama primary.