IMHO, first thing to do is buy an external usb hard drive and copy/move all your personal My Documents data files and folders to it. You will also need to copy your emails so tell us which mail client you are using (Outlook Express, Windows Live Mail or another)
What anti-virus and security programs do you have installed?
Which firewall are you refering to? is it Windows firewall or do you have a security program (AVG, Zone Alarm, Avast etc) that has it's own firewall)
If you have the XP cd/dvd you could run sfc /scannow from Start | Run which would check your system files (it prompts you to insert XP cd when/if it needs it)
Do you have the XP cd/dvd and the product key? and the cd/dvd's and the product keys for the extra programs you have installed? you can format (wipe clean) the hard drive and reinstall everything.
What make and model is your XP pc? you may be able to reset it to factory fresh from the manufacturers hidden restore partition - note you would have to reinstall all your extra programs.
If you bought a new pc I doubt you would be able to get one with XP on. Windows 7 can run almost all extra programs that XP does. You would be able to plug your external hard drive with your personal My Docs files on it into a new pc and use them as normal once you had installed your extra programs on W7.
Personally my thoughts are that as your pc is getting near/has reached end of life, buy an external hard drive and a new Windows 7 pc. Also do not give away your old pc's harddrive when you dispose of old pc. Either destroy it or keep it and wipe it clean and use it as an extra drive for storage.
Others will hopefully post with more advice.