AptHonestly, the most successful (and recent) thing I've done to prevent myself from tilting is to just mentally prepare myself by thinking "I'm not going to get upset no matter what happens" over and over again for like an hour before doing whatever it is that I need to go do, be it scrims/matches, etc.
I feel like it's sometimes inevitable to get frustrated or angry so it's more about getting a hold of yourself and not letting it fuck ur game than trying to avoid it entirely (in fact, trying so hard not to get mad may just be counter productive if it gets to the point that you're getting angry at yourself for tilting)