Does he cede power to the anti-establishment wing of his party? Or does he seek other pathways to successful governing by throwing away the partisan playbook and courting a coalition with the Democrats, whom he has improbably blamed for his party’s shortcomings?

“It’s really a problem in our own party, and that’s something he’ll need to deal with moving forward,” said Representative Tom Cole of Oklahoma, an ally of the center-right Tuesday Group, which stuck with Mr. Trump in the health care fight and earned the president’s praise in the hours after the bill’s defeat.

“I think he did a lot — he met with dozens and dozens of members and made a lot of accommodations — but in the end, there’s a group of people in this party who just won’t say yes,” Mr. Cole said. “At some point, I think that means looking beyond our conference. The president is a deal maker, and Ronald Reagan cut some of his most important deals with Democrats.”

Mr. Trump is not there yet. Before becoming a presidential candidate, he seemed to have little fixed ideology. But as president, he has operated from the standard-issue Republican playbook, embracing many of the positions of Speaker Paul D. Ryan and the party establishment. While he is angry and thirsty for revenge, he seems determined to swallow the loss in hopes of marshaling enough Republican support to pass spending bills, an as-yet unformed tax overhaul and a $1 trillion infrastructure package — legislation that could attract considerable Democratic support but has the potential to split the party.

On Friday evening, a somewhat shellshocked president retreated to the White House residence to grieve and assign blame. In a search for scapegoats, he asked his advisers repeatedly: Whose fault was this?