I can vouch for projecting being a possible cause. For me it kind of goes like this:
I play a long set and lose a lot
--> I'm getting angry
--> It's because I don't like losing
--> I don't like losing because I feel like I see it as failure / it makes me feel like I'm not 'worthy' to play my opponent
--> Both come from a general feeling of not being good enough if I fail at something
--> 'Not being good enough if I fail' comes from a lack of self-confidence.
So, in my case, after improving my confidence a bit in the past few years I started to get less angry, though it's not gone entirely however. Now, assuming the self-confidence issue is now taken care of, I can focus on seeing losing as part of the improvement process because lack of self-confidence is no longer blocking this line of thought. I essentially move up the chain a bit.