I know how you feel. Heres a tip, Instead of trying to win the game at that point, you could maybe just practice you're last hitting in a solo lane or trying out new item builds to further advance you're play for you're future games. Once again, its just a suggestion.
Now, lets say you're the hard-core competitive gamer. One thing you could do is rather then see this as a "lost game, gg ff @ 20 everyone sucks", you could see it in the perspective of a challenge. Shit happens, lets be honest. Alot of shit happens in games. You cant change that, but what you can change is you're perspective of those games, and that is what climbs you elo. If i get an AFK and its a 4v5, I tell myself, I will carry these scrubs 4v5 and I will win this game. And if i dont, well, i'll write down my mistakes and see why I lost and what i could of done better. By doing this, you track you're progress and helps you further excel as a player.
Im currently pushing for plat soon, and mentality is everything.