For weeks this fall, an ebullient President Trump traveled relentlessly to hold raise-the-rafters campaign rallies — sometimes three a day — in states where his presence was likely to help Republicans on the ballot.

But his mood apparently has changed as he has taken measure of the electoral backlash that voters delivered Nov. 6. With the certainty that the incoming Democratic House majority will go after his tax returns and investigate his actions, and the likelihood of additional indictments by special counsel Robert S. Mueller III, Trump has retreated into a cocoon of bitterness and resentment, according to multiple administration sources.