*Don't throw away your mac yet.* I sure felt like binning mine.
I know exactly what you are talking about here. I just bought a second hand 1st generation G5 imac and it worked fine for a few days but then I left it in a cupboard turned on and left for a couple of hours, When I opened the cupboard it was quite warm/hot inside. Maybe this didn't help???? Some people have said it shouldn't matter??
I had all the symptoms you mentioned and more.
Anyway what I've done is zero everything, re-install Panther, then get all software updates, then install Tiger, get all software updates. I then removed all the GE Force drivers from the Library/Extensions as per another blog. This all helped but it was still a bit sticky. i.e. freezing up a bit and sometimes completely. But it was working. My i-tunes wouldn't show album covers so I returned the GE force drivers to their rightful place and restarted and was all right for a day but then wouldn't start, which has also been happening a lot all through this and I have used command-option-P-R with varying success.
So I'm unable to start using all previous measures so I then restarted using the Panther install 1 Disc and opened utilities and used verify permissions and repair permissions a few times over and over and also verify disc and repair disc over and over. To be sure to be sure.
I'm now working away fine with much fewer problems but will I be able to start up tomorrow???
*Maybe the heat did have something to do with this* as per this other blog I just found:
http://discussions.apple.com/message.jspa?messageID=7519792#7519792