Check your BIOS settings for a hardware monitor section. (it is sometimes part of power management)
See if it has a shut down temperature set, or a setting to shut down the system if the CPU fan speed drops.
If you only have the fan speed shutdown, you might want to replace the fan on the CPU.
Make sure that the heatsink is making proper contact with the CPU.
Sometimes, a sheet that protects the heat transfer tape, or coumpound gets left on, and the CPU overheats.
I recommend that you install a hardware monitor program, or a case temperature meter.
This could be a cheap indoor/outdoor thermometer with the probe safely mounted inside the case near the CPU, but not in the air flow of the fan.
Monitor the temperature inside the case.
If it stays below 120F, you have adequete cooling.
If the system shuts down at a much lower temperature, you have a hardware problem.
I would suspect the motherboard. Only because it has the most solder connections, and sees the most physical stress.
Chas