As long as you are command line savvy, you can install most any system, because it seems that you have enough disk space, if 40 GB is really accessible. A full desktop environment, such as KDE or GNOME, if it runs at all, will be so slow that it will be non-functional. A moderate desktop, such as XFCE, may run, but it is not likely to do well either. You may have a chance getting LXDE or Enlightenment to work, those are about the "heaviest" environments likely to work with so little memory and processor capability. But any distribution that offers fvwm, IceWM, JWM, Openbox, or Fluxbox ought to work well enough to give you a window manager display environment. That would include any Debian derived system that uses Debian repositories, that would likely include a Ubuntu based system, adding in one or more of those window managers, that would include Crunch Bang #! Linux, which IS a Ubuntu derivative.
Absolute Linux, Vector Linux, and Slackware would be possibilities, again as long as you replace any heavy default desktop with one of the five or so lightweight window manager environments. Any other distribution where it either comes equipped that way or you can download such environments, would also work with a modest amount of research and work on your part.
I like antiX; you may be able to get that one to work great right from the installation.