Mr. Trump’s swing at Mr. Blumenthal was itself a function of yet another feud he has pursued, often in incendiary tones, against the judicial branch as it weighs the legality of his executive order banning travelers from seven predominantly Muslim countries.

It began this month when he called the Seattle judge who had blocked the directive a “so-called judge” who had made a “ridiculous” decision. He ratcheted up the insults during a speech to law enforcement officials from around the country, calling a hearing by a three-judge appeals court panel to review the stay “disgraceful” and comparing the intellect of the judges unfavorably with a poor student in high school.

And the president used Twitter twice last week to defend his daughter Ivanka, first targeting the department store chain Nordstrom — which had stopped carrying the apparel line bearing her name because of poor sales — for treating her “so unfairly.” Days later, Mr. Trump blamed journalists in a posting in which he expressed pride in Ms. Trump, whom he said had been “abused and treated so badly by the media.”

The White House is unapologetic about Mr. Trump’s outspoken style, even when it crosses the traditional lines observed by presidents of both parties, who have tended to avoid individual attacks on sitting senators, judges or individual companies, given the powers of the office. That Mr. Trump is willing, and even eager, to ignore those conventions, his aides say, is one reason his supporters adore him.

“Part of the reason the president got elected is because he speaks his mind,” Sean Spicer, the White House press secretary, said last week, questioned about Mr. Trump’s harsh words about members of the judicial branch. “He doesn’t hold it back, he’s authentic and he’s not going to sit back, I think, when he feels very passionately about something.”

Personal complaints and grievances have always weighed on, and sometimes motivated, American presidents in powerful ways, none more than Richard M. Nixon and Lyndon B. Johnson, said Matthew Dallek, a political historian.

“If you go back and listen to the tapes, they would talk privately with members of Congress or their staffs, and Nixon would say some pretty crazy things — about Jews, about people in the media who were out to get him — some of it was very petty, personal stuff,” Mr. Dallek said. “What is unusual is that President Trump is doing this publicly and it’s a near-daily occurrence, it’s multiple times a week.”