It's not upgradeable, mate. Your rig is just too old. U can't find CPUs with 478 sockets, DDR RAMs (maybe in some flea markets) or AGP 4x/8x gfx now. Or u should upgrade the rig completely (I'm afraid u couldn't even keep your PSU and case in upgrade)
I would recommend u to do some optimization such as Disk Defragment, Disk Cleaning ,uninstalling some useless software and disable some useless startup programs to make it alive again.
Only if u could find them in flea market...P4 is not for sale a long time ago. Stick to the optimization as I mentioned or reinstall your OS to Windows 2000 if it's too slow. (I did this to the Pentium III laptop and make it dual system, but i found Windows 2000 faster generally)
If you could find the parts for it, you might be able to search eBay or something, and upgraded it to it's possible full potential, you are still going to have an old, annoyingly slow, outdated system that is not good for anything today. Take it to the recycling center and be done with it.
It's not that bad. By good maintenance it could serve quite long like my old Pentium III laptop. The version of Windows XP isn't important. SP3 may be the best for security, go google "how to optimize WinXP" or stuffs like that and u would find tons of solutions. Here are some tips i've learned through yrs.
1. Disable Page File, disable system restore.
2. perform "sfc.exe /purgecache" to clean up some 300MB trash files.
3. using 3rd optimize software like TweakUP Utilities or Advanced System Care, then your rig will come to live again i'm sure.
p.s. Right now i'm using my father's thrown-away 2001 Sony PCG FX-220 laptop (W/ Pentium III CPU and 512MB PC100 RAM) typing. It's still alive but a little bit slower than the new laptop if u manage it well and not to install too many software