Yeah I guess this thread would be more useful if there was a trick :/
The "trick", if you want to call it that, is to find reasons to forgive.
We tend to explain other peoples' bad behavior towards us with thoughts like "They're trying to **** with me, those sons of bitches" or "He did that just to be annoying". But statements like that are essentially never correct. The reasons people do what they do are more complex. And it is almost never (just) about you. Now, if we accept that, we can try to find alternative explanations for other peoples' meanness. This may be difficult, especially if you don't know much about the person in question, but rewarding in the sense that it lets you find a more realistic and understandable explanation for what has happened. Having such an explanation, or several possible ones, may allow you to forgive and let go of anger.