You can't change how other people act, but you can change your attitude to how they react. And, it turns out, your attitude can affect how other people act quite a bit. I used to have a phone wallpaper that said something like "be kind. You never know what kind of shit other people are dealing with." it was much for inspiring and eloquent than that, but it was a helpful reminder to be aware that I'm not the only person in this universe. Whatever I have on my plate - a bad day, a better place to be - the other person just has just as much shit they are dealing with.
Phone wallpaper is a great idea. For myself, I have to intentionally make sure that I go beyond just thinking "I respect this person's perspective" and ensure that I do something so they KNOW that I respect their viewpoint even when I am passionate about my own. It is amazing what a great work (and other) environment like that creates, even with co-workers whose viewpoints are so different from my own.