As I've discussed elsewhere, when we emerge from our childhood with a profound sense of damage and the shame that goes with it, when we feel hopeless about ever getting better, we tend to long for perfect and magical solutions instead. At the same time, a part of us comes to expect that we will become perfect and berates us brutally if we fall short of expectation. I'm sure many of you know exactly what I'm talking about: that savage inner voice that can make our life an ongoing misery.
In my own practice, the majority of my clients have suffered from such savagery, as I myself have done. Even in the best of therapeutic outcomes, this voice never goes away entirely. What we can hope to do is to free ourselves from its domination, to recognize it quickly and sideline the cruelty, moving on to more productive ways of thinking. The first step involves some techniques that can be worked on and mastered, in keeping with behavioral modification techniques as well as meditation; the latter part takes time and involves building mental muscle, the ability to think clearly and exercise non-harsh judgment.
In an early post on the importance of mental silence, I described ways to put a stop to verbal thought and focus instead on breathing, much as advocated by Eastern meditative practice. This becomes especially important in dealing with the savage inner voice. To this day, I regularly have the experience of recalling something I may have said or done and feeling my entire body flinch; I'll close my eyes tight and clench my muscles, as if somebody very strong were about to strike me. If I'm not paying enough attention, I might then start to tell myself what an idiot I was to have done such-and-such, or how stupid I am to act in so narcissistic a way. I think you know what I mean. Then I have to force myself to relax, to silence the words and focus instead on my breathing.
Behavioral modification refers to this as "thought-stopping," a useful technique. I do not, however, go on to voice self-affirmations instead. I don't believe in the lasting value of self-affirmations because they do nothing to promote real thought or to develop discernment. The truth is that my savage attacks often contain an element of truth to them. If I simply tell myself that I'm a good person, I'm strong and sensitive, that everyone makes mistakes, etc., I will have learned nothing from the experience. The goal is not to substitute a non-reflective positive judgment for a harshly negative one, but rather to develop a more nuanced capacity for discernment.
Let me give an example, one I've referred to in other posts, especially this one abut how to make an apology. Many years ago, I said something hurtful to a friend at a dinner party. It took me a long time to recognize that I had misbehaved; once I did, I came down very hard, berating myself for behaving in a thoughtless and hurtful way. I was brutalizing myself. The solution was not to start telling myself that I was actually a good, thoughtful person, or to tell myself it's okay to make mistakes; what was needed was to remove the savery from the self-criticism. Once I did, I was able to understand the envy that drove me to misbehave, to make an apology (though not as genuine a one as I should have given), and to pay more attention to my own frustrated longing. In the process, I moved from viewing myself as a contemptible loser to a frustrated writer with painful feelings of envy for a successful friend. This didn't excuse my behavior but made it understandable. I learned something from the experience.
It takes a long time to develop the capacity to make such a transformation. What we try to do is evolve a better internal parent, one who doesn't simply attack you because you made a mistake or lie to you about how "good" you are, but might help you understand why you made such an error and how you might learn from your experience in order to avoid such an error in future. In my experience, it's difficult to make this change alone. You may need to work this through in the context of regular psychotherapy, with a person who you respect. Even then, it's not easy. With my clients, I've been repeatedly struck by how difficult it is to clear a space where we can think together about something the client did, without feeling crushed with humiliating shame on the one hand or taking flight from it on the other. For such clients, as discussed in my last post, any attempt to exercise discernmnent feels like harsh judgment.  It takes a long time to transform black-and-white thinking into a process with shades of gray.
Without such a thoughtful internal parent, only two options exist: either you're wonderful and everything is fine, or you're a contemptible fuck-up and you'll never be any different. This dynamic leads to a cycle of crime and punishment, as discussed elsewhere, where nothing can be learned and we're condemned to repeat the same behaviors again and again.
Finding Your Own Way:
Think of something you did or felt for which you've criticized yourself harshly. It may be something that happened long ago that you've never gotten over. Maybe the memory of it makes you cringe, as some of my recollections do. Don't run away from it or attempt to put it out of your mind, but focus on your breath and work for mental silence. See if you can keep the idea in mind without berating yourself.
Can you think of possible reasons for your behavior that involve no harshness, either for you or for anyone else (i.e., no shame or blame)? Can you feel any sympathy for yourself that doesn't excuse your behavior or make it somebody's else's fault? Can you learn something about yourself from that experience that might help you to do something different next time?
The goal here is to recognize traits or feelings that might cause you trouble in future but not to judge them harshly; to take them into account and tolerate them next time, without simply acting reflexively, without understanding, and berating yourself afterward.