I can understand where you coming from, since there are moments when we get frustrated because of losing. Playing the game competitively will place you in the mindset that you have to win to have fun, but try to think about it in a different way. Remember that you don't always have to win to have fun. If you're concerned about winning, knowing how to accept losses and learning from each set or match will help you improve your skills rather than constantly winning every match/set. Playing the matches to learn is more effective to improve your skills. There are times where you'll be upset over a loss, but just remember that it is helping you improve your skills in the long run.
Also one other thing is to let go of judgements. Don't force yourself to set expectations to work out in a certain way only to get upset when your opponent turns the tables on you. Try to set your mindset to focus on what's happening during the match and to accept things as they are when playing. Understand the reason why you lost and figure out a new strategy or plan to adapt to your opponents, which again, will help improve your skills in the long run. Sometimes you will win against your opponents, and sometimes you'll lose. This principle doesn't only apply to you, but to everyone else. Just remember that every single loss doesn't represent your true ability, as sometimes you can get outplayed by your opponents. In the end, try to view losing as a learning experience rather than failure. Remembering it as failure will further hinder you and make you more angry than you are.
If you have anger issues, I'd say to figure out some form of way to manage your anger. The first step is to understand that you have anger issues. Yes, I know, it sounds really basic, but there are people out there who won't admit or face their own problems. There are also people out there who are delusional, and it would be bad if you're 'that guy' who believes that he's the best player in the world. Having that mindset will bound to cause you to be angry or upset over a loss. If you do have anger issues, try to take a few breaths or so after the match to calm yourself down, or take a break after each match or so and come back later to calm yourself. Since this is a wide problem that's not only apparent in the gaming world, there will be solutions or steps that will be different among people to help alleviate their anger issues. Honestly I would say to just try out different methods to see what works out the best.