|Your computer is over heating somewhere or it may be a bad PSU. |
Do this to find out:
Leave the side panel of the computer case off and point a house fan blowing into the computer. Turn the computer on and if it turn off by itself then I would get a new PSU preferably one with more power.
And if it does not turn off you need to put some fans in that box.
oh make sure your fan on your heatsink on your CPU is working.