Separate the decision from the outcome.
Some choices are inherently risky. For example, let's say I propose the following game: you pay me a dollar, I flip a coin, if it's heads I give you $10 and if it's tails you get nothing. This is a great bet for you to take, but of course you will walk away with nothing half of the time. The key is to remember is that you made the right decision, even though it did not lead to the ideal outcome.
Making good choices is all you can ask of yourself. For example, let's say that if you ask for a raise, perhaps nothing happens 2/3 of the time and you get a 10% salary bump 1/3 of the time. So you ask your boss, and he says no. That sucks. But did you make the right decision? Sure! You had nothing to lose, and you knew that asking was not a sure bet. Your correct decision didn't pay off this time, but it might pay off the next time or the time after that.
Why would you be unhappy about making the right choice?
Focus on the process, not on the goal.
If your goal is to get a job, then you'll be anxious during the interview and disappointed if you don't get the job. If your goal is to do your best at an interview or to apply the lessons you learned at the last interview, then success is entirely in your control. This is a refinement of the last point: if the process is in your control but the outcome is not, then focus only on the process.