If we're talking random players who are toxic, I usually just ignore them. That or tell them to stop (politely). If they don't want to stop I just ignore them and report them afterwards. There isn't much you can do in game to stop a player from being toxic other than /mute. It sucks, but it's the best thing we have. Usually if you remain quiet and don't stoke the fire they stop talking. I've had that happen a couple times where an ally tried to flame my team for their mistakes, but we all ignored them and they went quiet pretty quick when they realized no one was responding.
If we're talking about a toxic friend, that's honestly a tough situation. I've had my fair share of toxic/easily tilted friends I played with who can't seem to grasp how terrible they're acting. I've tried being calm during games, telling them it'll be okay or not to worry to diffuse the situation, but usually those types of people are hard to reach once they've gotten into that state of mind. Mostly for the easily tilted ones.
The friends I used to have who were super toxic to play with I just stopped playing with them in general. I couldn't stand their behavior and pretty much removed them from my FL. I do this with any game really :P Even when I've approached them about their behavior towards me and others (nothing like being called a "whore" by a "friend"), they generally deny it or shrug it off like no big deal. So there's no reason to waste time on them and ruin the game forever.
Overall, all I can really say is you can try talking to them, but keep in mind you can't change a friend who tilts/is toxic unless they want to change themselves. You can do literally everything to calm them down, but it'll mean nothing if they don't want to listen, or don't want to admit they have a problem. It's best to let them be and focus on your own peace of mind. If they keep getting worse or make the game less fun, then it might be time to sit them down, have a heart-to-heart, and tell them that you enjoy their friendship, but you can't keep playing games together until they improve their attitude. Just, obviously be very polite and professional about it. Don't be accusatory, but don't let them deflect the blame via excuses.
As for behavior in higher ranks: It doesn't get better. Toxic people exist in every rank unfortunately. It has nothing to do with skill level or elo. It has to do with the individual playing and their attitudes.
I hope that helps :) And I wish you luck.