Lord knows, other people can be difficult to deal with at times. Our attitude in return doesn't make the situation any more manageable. So here's a useful trick for dealing with others that can change your frame of mine: Try to approach every person you meet as if they have something to teach you. Imagine that they and they alone possess enlightenment in some particular area, and that this knowledge could benefit your life.
Not only will this give us more tolerance and compassion for those around us, but it helps us stay humble. Approaching the world as if we are the only enlightened one and everyone we meet is a moron probably is not accurate, and it certainly isn't helpful. Especially when someone disagrees or views things differently from you, it helps to remember this rule. Approach the situation as if you're a student and they are one of life's many teachers, and you'll find that compassion towards others flows more easily, making it much harder to upset yourself.