Hey I can relate to you on this because I often get a bit more tilted than I think my teammates realize because I keep those feelings deep inside me because I'm still really embarrassed about this time I got really mad during a floor hockey match when i was 10.
Its hard not to give "obvious advice" to someone about a topic like this but I'll try my best. First, make sure you've taken care of all of your homework or whatever else you need to do. I find it a lot easier to stay chill when I play tf2 when I'm playing it as a reward for getting all my shit done. Yeah, losing sucks, but its much easier to not give too much of a shit about it when you're just fucking exciting to be done with boring stuff and can finally play some team fortress 2.
STAY HYDRATED
CRACK OPEN A LUKEWARM ONE U FORGOT ABOUT BEHIND UR MONITOR
Work on your posture. Playing tf2 is kinda like playing an instrument in the sense that its all about keeping tension from forming in your hands, wrists, and fingers and your posture has a lot to do with that. Go look at yourself in the mirror and check for anything going on funny with your pelvis. .