If you aren't in a good, positive, constructive mood to start with, don't play. If you are in a bad mood, then things going wrong during a game are likely to make you feel worse, but if you are in a good mood to start with, you are more likely to be able to respond constructively (even when things go wrong), help your team, and pull off a win.
Also: expect your team to be competent, not incompetent (because if you expect them to be incompetent, they will live up to your expectations). Assume everyone in the game is an exceptional player (better than you), and that everything they do has a reason, it just might not be a reason that you are enlightened enough to think of yet. Also, reverse your thinking: if someone on your team dies a few times, it isn't because they are a terrible feeder who is wasting air, it is because the person who killed them is an excellent player who is having the game of their life (and you have to respect someone playing well like that, even if it is at your expense).