If you want to look at the bright side of things, at least we’ve learned that the nation can survive for half a year without a sane, functioning presidency.

We’ve had nothing of the sort since Inauguration Day. The man who works in the Oval Office is a walking, talking, tweeting advertisement for Ritalin and perhaps some calming therapeutic activity such as yoga. We are fortunate, in a sense, that President Trump’s lack of focus and his anger-management issues keep getting in the way of his policy agenda, given that the agenda is so wrongheaded. But that is an awfully thin silver lining in a very thick cloud.

As I’ve written before, I’m not qualified to assess Trump’s mental health. But there are moments when it would be dishonest not to raise questions about his stability. If the commander in chief of the most powerful military force in history has a problem with impulse control, the whole world has a problem.

Thursday morning, Trump wrote the followingtweets: “I heard poorly rated @Morning_Joe speaks badly of me (don’t watch anymore). Then how come low I.Q. Crazy Mika, along with Psycho Joe, came to Mar-a-Lago 3 nights in a row around New Year’s Eve, and insisted on joining me. She was bleeding badly from a face-lift. I said no!”

The president was referring to Mika Brzezinski and Joe Scarborough, co-hosts of MSNBC’s “Morning Joe” (a show on which I appear regularly). The viciousness and sexism of Trump’s very personal attack are obvious. That the president of the United States would say such things publicly is beyond disturbing. It’s downright scary.

(Peter Stevenson/The Washington Post)

To their credit, three Republican senators used Twitter to react quickly and appropriately. Lindsey O. Graham (S.C.) wrote: “Mr. President, your tweet was beneath the office and represents what is wrong with American politics, not the greatness of America.” Susan Collins (Maine) tweeted: “This has to stop — we all have a job — 3 branches of gov’t and media. We don’t have to get along, but we must show respect and civility.” Ben Sasse (Neb.) added: “Please just stop. This isn’t normal and it’s beneath the dignity of your office.”

I take issue with one thing Sasse wrote: This sort of thing is normal for Trump. And the president demands that the whole White House follow suit.

Deputy press secretary Sarah Huckabee Sanders was asked on Fox News about Trump’s “Morning Joe” screed and actually defended it. “Look, I don’t think that the president’s ever been someone who gets attacked and doesn’t push back,” she said. “There have been an outrageous number of personal attacks, not just to him but to frankly everyone around him. People on that show have personally attacked me many times. This is a president who fights fire with fire and certainly will not be allowed to be bullied by liberal media and the liberal elites within the media or Hollywood or anywhere else.”

There is some political intention behind those words; Trump believes that attacking the “liberal media” and “elites” and “Hollywood” helps him with his base. But since he demands that his aides back him all the way, Sanders couldn’t even allow that perhaps this time the president had gone too far.

One doesn’t need a degree in psychology to wonder if the president suffers from some deep-seated insecurity. I can’t help but think about that Cabinet meeting this month in which the top officials of our government, one by one, obsequiously told Trump what a “privilege” and a “blessing” it was to serve him. According to widespread news reports, Trump spends hours each day watching cable news and railing against his critics. He sees the various investigations into Russian meddling in the election as attacks on his legitimacy as president — yet what really undermines his legitimacy is his propensity to go off the rails.

What’s truly alarming is the self-defeating nature of Trump’s spasms. At the moment, he is trying desperately to get GOP senators to agree on a health-care bill. Did a sexist attack against Brzezinski help him with Collins or Lisa Murkowski (Alaska) or Shelley Moore Capito (W.Va.), who happened to be on “Morning Joe” on Thursday? Not on your life.

The obvious question: What happens if there is an international crisis and Trump’s delicate ego is threatened? Can those around him contain his worst instincts?