if you removed the cpu from the heatsink (not fan from heatsink no paste there) then the thermal paste needs cleaning off and reapplying.
If you don't think its a heat or RAM issue then most likely PSU is dying.
Are all fans running including graphics card fan? has the heatsink been dusted out? no fluff betwen heatsink and fan?
all connections on motherboard are tight
all cards tight in slots?
nothing trapped between motherboard and case causing a short?