Self-righteousness, imo
(Source.)
Self-righteousness is usually defined as certainty in one's own moral standards that gives one a sense of superiority over others. But in my experience, self-righteousness is just the feeling of someone else drawing your internal critic's fire. The hale of holier-than-thou bullets hurts the people you judge and makes your relationships more guarded. But this isn't really about other people-- they are just innocent bystanders to your internal struggle. Practicing self-righteousness hurts you by strengthening both your internal critic and the critic's narrative: that judgment and self-loathing are saving you from being the unworthy person you really are.
I've been very self-righteous in my life. When I judged others, it gave me temporary relief from my own self-judgment, but it also taught me that I owed the respite to being hard on myself. I had to step up the self-criticism if I was going to be justified in judging others, which I needed to do to get a break from self-criticism. If I eased up on myself, it wouldn't be fair to all the people I had judged-- it would make me the bad guy, which I would certainly hear about from my critic. If I stopped judging others without extending the same courtesy to myself, as I tried at times, I would feel like the uniquely worst person in the world.
It's scary, difficult, and unglamorous work to de-escalate tensions with your inner critic. You have to leave your Stockholm syndrome-style comfort zone under their whip. You have to let them unload on you without giving in to their demands. You have go out on a limb to love and accept yourself even though you're not quite sure you've earned it. (I actually think it is this act of grace toward yourself that makes you feel worthy of love and acceptance.)
Self-righteousness comes much more quickly and easily. Sneakily, even. It comes with a high, instead of the exhausted incremental contentment that comes from remediating self-judgment. But self-righteousness is not only no substitute for unconditional self-love, it's an addictive impediment. It's like taking heroin to be happy-- it works really well for a little while, but before long your life is ruled by getting enough of it just to feel normal.
Once you've broken their stranglehold and they've had a timeout, I think it's important to have compassion for your critic and welcome them back to your mental family on healthier terms. Your critic is a part of you that's just gotten a little deranged in its attempt to help you. Until I was able to forgive my critical thought patterns for hurting me, I couldn't forgive myself for being so cruel and judgmental to other people.
I can start to embrace my critic now (somewhat) because I have stronger boundaries. Most importantly, my self-love and -acceptance is not contingent on ANYTHING. The critic cannot touch it. Provocations that would once have reflected on my worth as a person (such as having a mistake pointed out to me in my dissertation) don't seem so personal anymore. And my anxiety is way down because I don't approach everything I do as a make-or-break bid for my own love and approval. It's early days, but it seems to me like the critic is getting back to more productive work. More and more, I find myself thinking "good catch, critic."
In sum, self-righteousness, imo, feels so good because your inner critic turns to someone else for a while, and you feel good in comparison. But the real problem gets worse every time you indulge it, because your critic gets more and more overpowered and more and more tied to your self-worth. You can't keep catering to the critic's demands-- it needs to be clear who's boss-- but it is helpful to be able to reassign the critic to a healthier role when you're ready. A healthy relationship with your critic requires that your self-love and sense of lovability be off the table. Then the critic is working for you instead of you for it.
There's so much more to say, since this has been a big life struggle for me, but I'll only add that this de-escalation and reconciliation process has led to amazing things for me. I can enjoy life so much more when everything isn't some oblique reflection on whether I'm good enough. I can enjoy other people on their own terms. I can save so much mental energy by not constantly judging! And, finally, I can admit that I have really had a problem with self-righteousness throughout my life and sincerely apologize to those (others) that I hurt.