– Under pressure over his possible impeachment, President Richard Nixon supposedly talked to the paintings in the White House. President Bill Clinton absently toyed with his old campaign buttons. President Donald Trump punches out Twitter messages in the lonely midnight hour.

Long after his staff has gone home, long after the lights have gone out elsewhere around the capital, the besieged 45th president hunkers down in the upstairs residential portion of the Executive Mansion, venting his frustration and cheering on his defenders through social media blasts.

This is a season of conflicting impulses for a president who often seems governed by them. As the House moves toward what even he says is an inevitable vote to impeach him for high crimes and misdemeanors, Trump toggles between self-pity and combativeness.

He looks forward to a Senate trial that he seems sure to win and thinks that it will help him on the campaign trail when he travels the country boasting that he has been “exonerated” after the latest partisan “witch hunt.”

But he nurses resentment over the red mark about to be tattooed on his page in the history books as only the third president in American history to be impeached. No matter what some of his critics say, advisers said he genuinely does not want to be impeached, viewing it as a personal humiliation. Even in private, he accepts no blame and expresses no regret, but he rails against the enemies he sees all around him.

“He doesn’t like what’s happening,” said Sen. Lindsey Graham, R-S.C., a vocal ally who spoke with the president several times last week. “He thinks it’s unfair. But I think he’s resolved himself that they’re going to do it, they’re out to get him. I think he’s more determined now to win than ever.”

Trump’s mood has actually improved in the past couple of weeks, advisers say, as Republicans have risen to his defense. He has grown more energized, bombarding followers with tweets and retweets defending himself and attacking his enemies.

He set a record for his presidency Thursday with 113 tweets in a single day, eclipsing the record he had set Sunday with 105, according to Bill Frischling of Factba.se, a service that compiles and analyzes data on Trump’s presidency.

Eighty-seven of the tweets Thursday came from 7 to 10 a.m., just as the House Judiciary Committee was opening its marathon meeting to approve two articles of impeachment.

Trump decided against presenting a defense during a Democratic-run House inquiry he deemed unfair, conceding that a vote to impeach along party lines was inevitable. But he has set his sights on a trial in the Republican-controlled Senate as a more conducive venue to air his views about the impeachment battle and mount a defense that he imagines more like an offense.

That could put him at odds with Senate Republicans whose interests are not the same as his. Absent dramatic new revelations, Trump appears assured of escaping conviction in the Senate since that would require a two-thirds vote. But he has been eager to call witnesses Senate Republican leaders are not anxious to summon, like former Vice President Joe Biden and the unidentified CIA whistleblower whose complaint kicked off the impeachment inquiry.

Sen. Mitch McConnell, R-Ky., the majority leader, talked with Trump this week about holding a relatively abbreviated trial without calling witnesses, according to a person briefed on the conversation. McConnell envisioned a trial lasting about 10 to 12 days and sought to convince Trump that a quick acquittal without the spectacle of a parade of witnesses would be better for the president.

Trump seemed amenable, but he often changes his mind and no one is certain where he will end up.

For Trump, the impeachment battle has become the defining test of his presidency, weighing him down and charging him up all at once.

Some advisers said the collective burden of three years in office and the nonstop investigations had taken a toll on him. People who have spent time around him lately said he seemed fatigued. Some who work in the White House have noticed that he seems more standoffish, less likely to engage in small talk with those outside his inner circle.

What Trump’s advisers worry about is the snapback of his anger once the impeachment process is over. They predict he will be furious, and looking for payback.

Graham said he warned Trump against that in a phone call Wednesday night. “I just told him we know how impeachment ends, then after that your fate’s in your own hands,” Graham said. “Get back to being president and have a good story to tell.”