I suspect you're probably going to have to open up that machine and check to see what's going on inside. Your iMac has three fans (newer models only have one): CPU, HDD, Optical Drive. If any of those fans stop or the temperature sensors for them are defective, the machine might overheat.
Sounds like a good place to look. Since I can initially boot it up for about 5 minutes, I suspect I'd have time to run a ultiity that could show me the readings from each of those temperature sensors. Any suggestions on what utility might fit the bill?
Thanks