I fixed that by putting a normal desk/household fan and directing it at the computer. After some time, however, it started doing it again, and if I turned it on right after it froze it would not recognize my HDD.
So I opened the side and put a fan there as well. It worked fine for about a week or two, but yesterday I turned it on and there was no internet connection, while the other computers had it fine.
After a couple of hours using the computer I decided to restart it and it got to a screen asking if I wanted to initialize it normally, etc. I tried every option. When I try to initialize normally or in the last valid config it freezes after about 20 seconds in the windows loading screen with the Windows logo and the blue loading bar.
When I try to initialize safe mode, there's a command prompt-esque screen, and it tries loading some files but just stays there and doesn't move. I gave it the night to rest but today it still does the same. Help!