Reinstalling Windows XP and all of my applications and data took a whole day, but now it looks like most of it is working again, without losing any data. And the machine performs much better now.
It'll probably take couple of more days before eveything is back to normal (or before I notice all the stuff I didn't backup). But so far everything looks OK. I should have done this a long time ago.