I would check before buying new parts the temperatures your computer is running while playing. Install MSI Afterburner (i believe an old version works with windows xp) and set on display information GPU and CPU temps. While playing, make sure the temps are showing in the left upper corner and keep looking at them. If the temperatures get too high, that might be the reason why your computer is shutting off. In that case, maybe a new cooler or new thermal paste.
If it's not a temperature problem, try testing the computer but this case without games. run prime95 and ckeck temperatures at the same time with CPUID Monitor. If you can run that test for a long period without problems, then it might be graphics card fault.
If not, then it might be what the tuweyy said, a bad power supply, or even maybe bad capacitors in your motherboard. I would also do a memtest before buying new hardware, maybe it's a ram problem (but i doubt, ram problem usually give bsods).
good luck