I had a similar problem on my old PC and it seemed to be only when playing GW2. Turns out my graphics cards fan had crapped out and wouldn't spin, for some reason this game and my fan-less GPU really didn't get on. The odd time the GPU fan actually worked, the game ran fine and the computer wouldn't restart itself.