Okay, maybe I got a bit caught up on that one.

Anyhow, I'd say it probably got broken a while back (while you were servicing the cpu fan).
But this is likely a moot point (if it was sitting relatively well and worked fine for several months then it couldn't have been too much of an issue)
And I'm starting to get a very clear picture of what happened here!
Seems that at some point, the CPU fan failed, you couldn't have known, and the heat caused damage (to the cpu, motherboard or both).
I'd say you should be looking at getting a combo of a new motherboard/cpu/ram.
I could help you pick em if you want to.
Also, just a word of advice, if your case doesn't have a side window, then better get one that does (and put it next to the monitor where you can actually see thru it!) this could give you a heads up next time.