My old PC had that problem, and it was overheating. The fans were all working fine, it's just that the hardware was old and on the way out, more sensitive to heat or something? Idk, but if I took the side off the case and pointed a big house fan into it I could get it to run for a little while longer than normal.
Unfortunately I didn't find which piece of hardware was overheating, as I just got an all-new PC. It wasn't hard drive, anyway, as I managed to put that into this PC and it's still working.
I THINK it was the proc, but it coulda easily been the PSU too. But yeah, sucks to be you!