Is it just his personality to see the world a bit negatively? If it is, try to accept that that's part of his temperament and focus on behavior instead of trying to change his entire world view.
What does he do when he's grumpy that's undesirable? Focus on those behaviors and treat them as you would any other negative behavior, with whatever consequences you would normally use. Better yet, reward him when he handles something well - perhaps a sticker chart where after a game, you evaluate how he handles himself and if he shrugs off his disappointment or expresses it in an acceptable way, he gets a sticker that will build up to some kind of reward. When he does handle disappointment or a bad day with grace, really talk that up.
At the end of the day, you can't prevent him from feeling how he feels and don't want to invalidate his feelings, but you want to teach him to process negative feelings productively and gracefully so that he can get past them and move on.
One tactic that I use with my kids is "The Four Gs" - think about what's good in our lives, what our glitches are, what we're grateful for, and what our goals are for the day. I do this in the morning when I'm still lying in bed and recently shared this idea with my kids. I didn't think the older ones listened at all but I saw a text on my teenage son's phone where he was telling a friend about this and how it helps him remember to be grateful and focus on the good. I do this with my youngest son when we're walking to school in the morning. It might be an exercise that you can do with your son to help him to be able to think about something that's not going his way (the "glitch") but also think about what's good, what he's thankful for, and to set a goal for the day.
I hope that helps - two of my sons have rather sensitive, touchy, negative personalities but over time, they are learning to just roll with things.