first go to control panel,then system,then advance,then start up and recovery setting,at
system failure,disselect automaticlly restart.so next time you got system failure it wont restart
then check what problem is,i think it maybe power supply or fan stop working.