But it only happens in game, and your computer fires no event saying the CPU is overheating? I am almost positive your PSU is just simply not supplying enough power. A UPS will not make up for this. The UPS will only fix the problem if its faulty electrical wiring, power strip, or surge protector. It wont provide extra power for the CPU to use.

To test that your GPU is sucking up too much power. Underclock it by like 50% just to see if your computer shuts down afterwards. If it does not. You can start raising it by small increments to find how much you can use before it powers off.