I'm sure there's an actual name for this but I'm blanking on it at the moment. I try to live under the idea that we're all one being. That in everybody is a piece of me, and in me a piece of everyone else.
I guess it's like an extrapolation of 'the golden rule'. But I think to myself like, if I was being ignorant, I'd want someone to have a conversation with me and help me understand where I was wrong. If I was having a bad day and was visibly frustrated in line, I'd want to have someone stop and ask me how I was doing.
I think most negative people are just hurt. The longer you go without talking about what's bothering you, the more bitter you get. Most people, no matter how they're acting, change when you ask them if they're ok. Most of the time (I'll admit, there's some exceptions lol) its better to be sympathetic rather than defensive.
It's easy to get heated but it takes a lot of patience to really try to understand. Stranger or not, I do my best to help rather than provoke. We've all got our bad days, but that doesn't mean we aren't deserving of compassion.