Getting upset for other people

I keep getting upset or emotionally invested when I see other people acting badly towards one of my friends/colleagues etc.
I am aware that “badly” is also my judgement. And I have manuals for those other people (they should not be saying this like that to xxx). But I am not sure how to think about this differently or not to get upset.

C: Team lead of my friends saying words to my friend. (Friend tells me this and tells me he is upset)
T: Team lead should not say these things to my friend. (My friend should not be upset)
F: upset
A: discussing with my friend about it and supporting their view of the situation, not giving the team lead a benefit of a doubt, overthinking this, getting invested in it, being mad at a person I am not even I contact with
R: Both my friend and I are upset and are not solving the situation. (Not helping my friend to not be upset.)