All of the things I would try, not in any order..lol..
I hope it helps..
If you are overclocking, try not too.
Reset Cmos with the jumper or cmos reset button, then go into bios and load failsafe defaults.
Take out everything plugged into the pc that you do not need to get it running and useable. "Mouse and keyboard should be left attached obviously"
That includes all periphals "including phone chargers".
Remove all but one stick of ram..
Remove all but one video card..
Unplug all case lights and extras as well.
Run it like that and see if it happens..
Unplug everything in the computer down to the last plug.
Remove the mobo as well and check that the backplate isn't grounding out on something.
If you have an aftermarket cooler make sure the spacer isn't damaged in some way that allows metal to touch.
Check all cables for frayed wires.
If the cpu is running too hot the computer will shut down. Make sure your temps are safe.
Clean the fans out if there is gunk in them.
If they still are not safe, get better thermal compound, like AC5 and reseat the cpu and the cooling unit using the proper methods and proper amount of thermal compound. Do not use to much or too little.
Make sure the cooling unit is placed squarely on the cpu and is fastened in a proper criss crossing method, to assure a "uniform" pressure.
If anything helps, start plugging things in, ONE BY ONE and running the system..
Once it starts doing it again, you found your problem.
GL..