What it might be.
It can be a number of things unfortunately. a CPU overheating would cause a shutdown, but as yours has given you a blue screen of death while it was starting up, I find it unlikely that your cpu is overheating. In this case though, I think you have the same issue I had a while back.
I think it might be your RAM.
What you could try
If you aren't timid about opening your up your pc, ensure the power is off, all the way off from the wall, but leave it plugged in. (Although let it cool first)Touch something metal before opening. Lay your pc on the side so you have a good view of the motherboard. Ensure all the leads are plugged in firmly both ends (just to be sure) then check to see if your RAM sticks are seated properly into the slots. If they are, that could indicate at least one of your RAM sticks may have a dirty connection or just isn't liked by your motherboard. (I bought a bunch of new RAM to cure mine). There are videos on your tube to show your how this is done. Do not touch anything you don't have to.
You could try running your pc without some of the RAM, take a stick out to test if the pc runs okay and swap if it still crashes. Please refer to your manual about which are the 'primary' slots on your motherboard where you need to have RAM in to make your pc work. It should explain about 'matched pairs'.
Please note, this is just guess work from the information you have given, but I find temperamental RAM causes crashes more than anything else and is (fortunately) fairly cheap to replace.
I hope this helps.