I had a kind of similar problem with a laptop that turned out to be a problem with the thermal paste between the processor chip and the heat sink/fan assembly. The paste had somehow dried up and was not making good thermal contact, so the processor was overheating and cutting out. I cleaned off the old paste and re-applied new paste, and that sorted it out.
An app like the one in Gellyneck's post will show you if the processor is overheating.
An app like the one in Gellyneck's post will show you if the processor is overheating.