I don't think this is a heat problem. I think it's more likely to be connected with memory. Right-click "My Computer" select "Properties", click on the "Advanced" tab and look for "Startup and recovery" - click on settings there. Find "Automatically
restart" and turn that off. The next time the computer encounters an error, you should get a message instead of an automatic restart.