I had just played a game, in which 3 of my teammates were all flaming eachother in spanish and 1 was insulting them due to their language, our plays that game were mega questionable, so that didn't help with the flaming, nor did the flaming improve the team's play.
I wasn't angry at all, i didn't flame even though i did get flamed, but i stopped them from flaming me the moment i told them to calm down and i apologized for my mistakes (because i played like garbage that game) (and i also understand both languages), i could've just muted them, but that would've just made me curious of what they're saying and i would've blocked the little team communication there was.
It took me a while to stop getting frustrated at others, but i got used to it since, when i'm not solo queueing, i 5stack with some friends that get super salty from time to time, i realized that, when they got mad, everyone else just got angrier and we played worse, sometimes i just continued the arguments, which just lead to more flaming and more anger.
The mindset that i got from that, is flaming makes everyone spend more time arguing and makes their game unenjoyable, and therefore, almost unplayable, it's not going to achieve anything, even if your teammate is some guy who screams in a language you don't understand (yes, i know i said i spoke spanish, but i've encountered people who speak portuguese, which i don't understand in the slightest), flaming isn't going to make him stop screaming, hell, it might just make him intentionally feed or afk in the fountain.
Now, i'm not saying you should just swallow whatever words with dismembered grammar people throw at you, but before ignoring them, just try to get them to calm down, apologize for your mistakes (if you aknowledge them, because if you didn't make a mistake, don't apologize at all and justify whatever decsision you took, instead of pointing out the other player's mistake), and just move on, if they just go like "jaja puta madre csm ctm something something", by all means just mute them.
Another thing is the stuff that people do that just asks to get flamed, i mean, who has not wanted to flame a mid shadow fiend who went first item crits without boots and is 0/10/0. just give them advice on how they could still improve and get back into the game, and if they just disregard it, it's still going to be more helpful than just flat out flaming them.
Another thing is that people tend to look at situations from the worst possible angle, like if a pudge has 5 kills 3 minutes in, people think "well we fucking lost this game because he's just going to kill everyone", when they could be looking at the more possitive side, such as "nice if our carry kills the pudge he'll get a lot of money and we'll have the advantage", there are lot of situations that seem really grim, but thinking of the worst that could happen just makes you and everyone in the game stop trying, so just try to bring light to the possitive side of the shituations, it'll make everyone keep trying.
I know it's hard to not counter-flame people/initiate flaming on awful people for like 30-60 minutes, if you can't just prevent the insults, just save them until the end of the game, where you can just flame them all you want once the game is over, you might think that it'll just make you angrier to hold your insults throughout the entire game, but you'll actually get less angry than if you argued for 10 minutes about who's mother sucks more dick.
TL;DR: Flaming makes people play worse, looking at the bad side of situations just makes people stop trying, and just being calm and getting everyone to look at the best side will motivate everyone to win the game.
Source: https://www.reddit.com/r/DotA2/comments/2zgeat/how_to_mantain_a_calm_and_optimist_mood_in_ranked/