If it shuts down for no reason, I would suspect power problems or overheating problems first.
Monitor your CPU temperature constantly on a second monitor while you use your computer and look for suspicious increases in temperature, especially sudden ones. This would indicate cooling issues. Thermal paste could be a problem if worn or improperly applied. Cooling system malfunctioning or poorly performing could also be the issue there. Or dust, improper airflow in your case, a number of things to cause overheating.
Power supply could be going bad. Swap it out for a while and see what happens. Make sure you are not underpowering the board either. You can also monitor your power consumption of the system on your second monitor constantly too, which I have been doing lately since I had some really high power consumption by one of my games that was making my system unstable until I got it under control.
Davemon50