Donald Trump can’t help being himself. It’s why he lost yet another debate and why he will lose the election.

The post-debate coverage has been dominated by Mr. Trump’s refusal to say he won’t accept the election results, and rightly so. It would be a shocking statement, except for the fact that he has spent much of this month attempting to undermine the foundations of our democratic system. That he would do so in a debate, despite how obviously self-destructive it was, underscores what has always been his main weakness: his unstable and disordered personality.

Mr. Trump obsesses over polls and knows that the overwhelming odds are that he will lose. Psychologically, he cannot accept that; for him, being labeled a loser is the ultimate humiliation. Therefore he has to manufacture an excuse for his impending defeat, and in this case, the excuse comes in the form of him repeatedly claiming that the election is rigged.

But that very claim, which is an extraordinary transgression of an unwritten and almost sacred democratic rule, not only will help insure his defeat, but will make the margin of that defeat even worse.

Most Americans are unsettled and unnerved by Mr. Trump, and the more exposed to him they are, the more unsettled and unnerved they become. He doesn’t come across as an agent of change, which would help him; instead, he comes across as a radical and destabilizing force, which hurts him.

Narcissism — in this instance the inability to accept that he is likely to lose to a woman in the biggest contest in the world — was at the core of Mr. Trump’s answer about not being prepared to say he would abide by the outcome of the election. What Americans saw almost instantaneously in that answer is that the Republican nominee for president puts himself — his vanity, his self-obsession, his need to project dominance and therefore his need to win — far above everything in life, including the best interest of the nation. All of us struggle with pride and none of us is selfless; but no one we have ever seen in American political life is as egotistical and selfish as Donald Trump.

That character flaw has led him to several terrible moments during this election, including the one in Wednesday’s debate that sealed his defeat. Earlier in this campaign he was unable to cite his favorite Bible passage. Here’s one that he could have learned from and that foreshadowed his fate: Pride goes before destruction, a haughty spirit before a fall.

Peter Wehner served in the last three Republican administrations and is a contributing opinion writer.