How do you get over lashing out and not acting the way you would've wanted?

Basically, the first girl I ever dated broke up with me. It was a secret relationship, as both our families are religious and wouldn't have allowed us to see each other if they knew. When she broke it off, she asked me to never speak of this to anyone, as she didn't people to know. It devastated me. I'm not a very confident person and I realize today I blamed myself for not being "good enough": This would trigger panic attacks, on a daily basis. I didn't reach out for support, as I couldn't afford therapy and I promised her I wouldn't talk about this to anyone. I also cut off contact with her.

A year later, I apologized for ignoring her messages and for cutting her off without really telling her why, although I made sure to let her know that I can't be friends with her.

In this period, I learned that, while we were together, she cheated on me. I also discovered she told all our common friends that I don't speak to her anymore, that she doesn't know why and that she finds this rude.

I confronted her, asking about the cheating. She said she would never do something like this to me. I found proof and asked again. She denied we were ever in a relationship and therefore tells me she doesn't owe me an explanation.

It's at this moment that I lashed out. I told her "You know what, if I'm asked again why I don't speak to you anymore, I'm blowing the whistle about our relationship. It doesn't matter whether you deny it or not, you know neither of us will go unscratched from this and both of our heads will be put under the guillotine".

I threatened her. This is something I never do. I barely recognize myself when I look at how I've reacted to the breakup and I'm kind of ashamed. It makes me extremely anxious to know I did that and I can't get over it.
How do you get over lashing out and not acting the way you would've wanted?
Add Opinion