Perhaps this will sound a bit elementary, but the following technique has never failed me or my clients.
When frustrated about a situation, person, or whatever, write this down on a piece of paper:
1. What factual information do you know?
2. What fictitious information or personal opinion are you applying to said situation?
Separate these lists into two columns, if that helps, and then act only on what you know to be fact.
Example: You just had a job interview and thought it went extremely well, but you didn’t get hired. Naturally, you’d feel a bit upset, or perhaps really upset.
Fact: You had an interview, you didn’t get hired
Opinion: It went extremely well, you should have been hired, you didn’t get hired because the interviewer didn’t like you.
Possible reality: Someone else more qualified than you got hired and the interviewer had no bias whatsoever.
This habit is difficult to form at first. Hence my suggesting that you write each situation and break it down into fact vs. opinion. There will come a time, perhaps in a month or two, when this will become second nature.