Desktop keeps crashing/restarting or becomes laggy when playing games! Needed

My desktop have been crashing(?) when i play games like minecraft or LoL. I haven't played other games in awhile so i'm not sure if it goes with other games ;;

Here's a few problem;
1. When playing Minecraft public servers, I will lag and the whole desktop would start lagging really badly, i have to restart to get rid of that problem.

2. When playing MC server or during a game in League of Legend, my desktop would disconnect from my Wi-Fi and i would be able to connect back unless restarting the computer or when lucky, a few minutes after i'm suffering while refreshing the wireless network connection bar.

3. When playing minecraft server, i will usually lag and suddenly out the server i go.

4. Minecraft server&LoL again; My desktop will do something, it would seem like it is restarting at first, stopping all programe and shutting down but when it goes black screen, my desktop screen doesn't turn back on. I could hear the desktop just suddenly get quiet after and it is still on since the light of the desktop is on. Instead of press and holding the button, it would usually turn off, but this time with one small press it would turn off(?). I'll have to turn it on again and usually rush back to the game.

That's all i guess.
I don't really get it since my desktop have PLENTTTYYY of disk space and i'm not sure but my Wi-Fi used to work well when i was using a laptop.

Help me /dig a hole, craw into it, roll into a ball and cry forever till this is fixed/

Is your graphics card or cpu overheating? This is normally the number one cause of crashes or laggy computer when under load. Download RealTemp and MSi Afterburner to check your temperatures and if they're too high replace the thermal paste on your CPU and clean out all dust from your heatsinks and fans.
The other problem could simply be that your ISP is capping your internet bandwidth in peak hours - to be honest it sometimes happens in the middle of the night I have no idea how they decide who gets what. It could also be that the servers you're connecting to are simply overloaded.
Also run task manager when you're gaming and see what's happening with your CPU and memory - are they at full capacity? If so you might be looking at a significant upgrade.