If a machine shuts down, it is pretty much always either a voltage or a heat issue.
Get HWmonitor, and monitor your voltages & temps.
Stress test your machine with OCCT or prime95, or something that will hammer all the cores.
If all is OK after a few hours, then move on to stress testing your GPU, I tend to use furmark. Keep an eye on the voltages (set it to log the data), and if you see a shutdown, check the logs and see how hot & what voltages are at.
If both those check out OK, it is then time to run them both at the same time (prime95 + furmark) and again monitor the temps & voltages.
Hopefully, you will find what the problem is.