You need to try scandisk, checkdisk, Error checking in win XP before you do anything. It is not worth reformatting if your Hard disk getting smaller due to increasing bad sectors. Even if you format it back to what it was, the chances are it will start failing again, maybe fail totally and you'll lose everything.
Right click on your drive letter in mycomputer, select properties and select the tools tab. Check both boxes and set it away. At least it shouldn't take long on 40GB.
If you can't afford a new HDD then fair enough. Here, a game costs £30, an 80GB Hard disk costs £30. Depends on your priorities. just remember that the HDD is one of the major components of your computer, and the one which normally causes most problems. Depending upon the age of your old HDD you may even find a speed increase with a new drive, if your motherboard supports ATA133.
All I am saying is 40GB is a bit of a tight squeeze for XP and games. With game installs coming in at 4GB for a full install, that could be 10 - 12GB with 3 games installed.