Coping with other person’s negative emotions

A friend of mine is angry at me and doesn’t want to talk. Just after the situation that stressed him so much he yelled at me despite the fact that I apologized that he felt that way. I am really sorry that he made himself such a victim because of my words, but I am not sorry for my words and actions. However, he hasn’t spoken for a long time and I’ve begun to hesitate whether or not I could have done/said it differently. At the same time I understand that his actions are reflections of his feelings/thoughts and they do not impact me.

Could you please advise how to stay confident and not create unnecessary suffering around his actions. I thought it should be easier to cope with negative emotions/ actions of other people 🙂 Thank you!