Does this computer have a fan on the main chip? Any chance that its stopped working and the main chip is getting too hot, and auto shutting down? Have you checked the fans inside the power supply, main case and on the power supply?
If you take the case open you might look and confirm that all of the fans in the computer are working. Also look for hair, carpet fuzz and so on inside the computer.
If you are not experienced in this then its well worth being careful inside. Even when unplugged in, there are things inside that can shock you for a while afterwards, so tell us what you find and we can go from there.