Computer randomly turning off and freezing? (Not PSU related)?

So recently my computer has been acting strange. I custom build this PC and have had to fix it several times. This is the only one that has stumped me. Whenever my computer is put under any kind of stress, like with video games even as simple as Minecraft, after a few minutes, it either freezes or turns off. I'm pretty sure it's not PSU related because when it turns off, the lights and fans stay on for about 10 seconds, like it normally does on an average shutdown. I'm able to turn it right back on. I think it's my RAM, but I want some second opinions. Thoughts?

Have you checked the temperatures?