The bad wont feel as bad as it does now.. just ride it out..
We all have a dark side. Everyone. Some just manifest more so than others.
I have done things like that before.. I avoid situations where it might occur again.. and If I am not ready to give up on the being around that person I need to accept that part of myself until such a time as I am... and usually it gets to a point where I walk away..
Try not to define yourself in terms of good and bad.. we are just people.
Hugs... take it easy