There's some great advice in here but I think a lot of it focuses on the surface level, the symptoms of whatever's getting you riled up in game. I would recommend taking a long, hard look at yourself and identifying what is causing you to flame. I'll try sharing some stuff that has worked for me in the past.
Is it your environment, are you stressed out at home/work/school and this is an outlet for that stress? Find a healthy way to relieve that stress - be it exercise, meditation, music - just find what works for you and helps you shake off that edge before you get in game (I also find that when these factors are stressing me out it carries over into my IRL interactions - so fixing it can be really important).
Is it the game itself? Are you just not enjoying League right now? It's totally fine to take a break - a few hours, days, weeks. Just make sure that you're spending your time on League because you're enjoying it, not just because you need something to spend time on. Take a break, find another hobby, play another video game. League will still be here when you come back! I've been playing for over 7 years and there have been times where I just really wasn't enjoying it - and that carried over into my interactions in game.
Is it the competitiveness? League can get pretty intense when things are on the line - be it LP, self esteem, etc. Find a way to channel that intensity and competitiveness in a constructive way. I'm extremely competitive and often find myself getting frustrated when things aren't going my way - the best way I found to handle that frustration was to focus inwards. The only thing in League that you can actually control is yourself - your actions, your decisions, your mechanics. Getting mad at things you can't control is about as useful as getting mad at the weather (all it does is make you even more frustrated, it certainly doesn't change the weather). In ranked I focus intently on my own performance: I set personal objectives for every game (I'm going to
Flay every
E-Q combo I can, hit 100 CS by 10 minutes, keep the river warded for the entire laning phase, etc.) so the only thing I am competing against is myself and my own expectations. Every game is not a quest for ELO (keeping this mindset can get tough when it comes to end of season grinds, I won't lie), but a chance to improve myself and perform better than I did the game before.
Sorry if this got kind of rambly, I hope it helps. Happy to chat more!
_EDIT: Added a TL;DR. _
TL;DR: Take some time off and reflect on what's causing you to rage at your teammates. Fix that, then come back to League! Introspection is your best defense against toxicity.