Having an argument/setting boundaries

I had an argument with a friend of mine two weeks ago, or someone I thought was about to become a friend.

That person made a few negative comments about my lifestyle and personality. I got upset and clearly expressed how I felt about this kind of unhealthy behaviors. I really stood up for myself and set my boundaries. I’m glad I did it, but in a way I still feel a bit guilty for having lost my temper a bit.

How shall I process those negative emotions? I know they’re part of us but is there a way I can process it better and accept it better? Especially anger.