Overcoming Self-Pity

I am a woman in my forties. I have for many years done a lot of spiritual work. Recently I came into conflict with a person that I thought I loved, and I screamed and raged, something I have done much in my life and when in the moment I seem powerless over. It feels like momentary insanity. A friend gave me a CD where I got to hear about mastering you inner dialog and it shocked me to realize the part where you speak about self-pity and how it is the root of all anger and jealousy. I am that person, I pity myself and think I deserve better and so forth. So I got an insight and I am very grateful for that. Now my question: How do I learn to see through this self-pity in the moment? How do I learn to control my impulses? I have hurt many people with my behavior and also myself. My life is not the one I want, because I have lived my life in this denial of self-pity, and I see it no longer works, but how to change it?
I thought I was spiritual that I had gained some sort of insight over the years. This discovery somehow laid me bare and very empty, as if I have to start all over again. Please help me to understand.