Rule #1 of competitive gaming is don't tilt. If you tilt you're throwing in the towel, it's almost certainly a lose. I've had plenty of games where we have come back from "certain" defeat because of a positive attitude and everyone working together (though these are the minority of games). If you're going to tilt as soon as you start losing go play unranked. You cannot logically expect everyone on your team to be the best player ever and to always be better than the opposing team. What you can do though is work to outplay them with team work. Even if the other team is is "better" than yours all it takes if for them to mess up once and your team to be attentive and take advantage of it. If you afk in spawn because you're playing with "noobs" you give up that chance. I'll say it one more time, if you're serious about ranked, do not tilt.
To help combat this I always try to start the game on a positive note like "You all are awesome, lets kick some kitten". When I kitten up I take responsibility of it in chat to take away the chance for people to start throwing out "dumb noob" and kitten like that. Whenever my teammates kitten up I just say "It happens man, just roll with it" or something like that. If someone is being toxic, ignore them and keep being positive. If you feel yourself getting tilted, ignore chat and your team even though its not ideal. Its better that you just focus on doing the best you can rather than afking at spawn. By keeping the team positive I've even had games were we have come back from having a DC for the first half the game.
I'll leave you with this little nugget of positivity;
"Don't hate people if they hate you! Do good, die great" - Jordan
Depression and anxiety are the worst...