I had that happen once and it took me a YEAR to find the problem! And I worked as an electronic tech for a decade. I LITERALLY replaced EVERY part of the PC AT LEAST once--EVEN THE CASE. And it STILL would freeze!
TURNS OUT when I upgraded from a 386 CPU to a 486 the company gave me a 386 fan! I didn't know there was a difference, so that was the ONLY thing I DIDN'T replace--HEY, the FAN was WORKING ...
and there *were* OTHER things that COULD cause freeze-ups, such as the video card. So when it froze up, I would swap video cards. And then it would work. So OBVIOUSLY the cause MUST be the video card--right?
Of course, by the time I swapped out the video card that CPU had cooled down ...
But then ultimately it would freeze again. So I would put back the old video card and keep looking ...