I think most of us go through this stage, whether we realize it or not. It takes some hard work to realize what we are doing and why. One you understand WHAT you are doing, the hardest part is to fight against it.
For me, I tend to get "angry" and "slam emotional doors". Meaning, when I feel pain in a relationship…instead of talking about it and telling the other person how I feel, my defense mechanism is to push them away. I could let the person get close, but as soon as they hurt me I shoved them away and didn't look back.
I began to recognize that I was doing this and couldn't get on top of the emotional reaction. I simply withdrew, and made sure the person did not come back. In reality, people (including me) and going to make mistakes. No relationship is ever going to be sunshine and rainbows all the time. If I can't feel pain, and be willing to face it, then I'm not ready to be in a healthy relationship.
So, now I force myself to face the emotion, or pain. I do everything I can to not retreat and WORK through it. I face the emotions, communicate about it and try not to fear any consequences.
I think a lot of it is just recognizing the emotion and where it is coming from, then making the decision to work through it. I find I have to force myself, but at least I'm trying.
It is a matter of facing the pain instead of running from it. As my IC says…it takes practice.