It's not a fan or electrical issue, or your computer would shut down.
I doubt it's a RAM issue, a computer won't fully freeze even if the RAM is low, and most operating system (when I say most I mean all from windows 98' up) give you a virtual memory low error message, and I doubt they are disconnected from heat to cold temperature expanding and detracting or you would have a non-existing virtual memory error message.
If your computer can run in safe mode, then it's most likely malware, or a driver was infected by a virus.
If you need to save any information follow these steps, if not skip to step 4.
1. get a USB hard drive adapter (they cost like $10-20, but are great for hard drive repairs)
2. Remove your hard drive
3. Connect it to another computer, open up my computer and transfer the data in the hard-drive to an new folder. After your done extracting your information click on the hard drive folder and you should be able to format the hard drive. (this will wipe all information on the hard drive!)
4. Put the hard drive back in and An operating system install disk along with the key. Boot from disk. Do this by getting into the BIOS either by pressing f2 or f12 right on start up, and changing the boot order.
5. The operating system will start to unpack and prepare for installation. Let it install and follow the directions on the screen.
If you need additional help don't hesitate to ask. I'm going to school for computer engineering, and have fixed countless computers in and outside of the classroom. Hope this helped.