Yes, files MAY be recovered from a failing hard drive, however the success depends on how badly the existing drive is functioning.
What I would suggest (if you are able to boot into windows) is to go to a command prompt by using the start menu , then in the RUN box type the letters 'CMD' and hit enter. In the box that appears next, type the following text: chkdsk /f /r <then press enter>.
The system will tell you that it cannot run the operation on the drive and ask if you want it to run on the next startup. Hit 'Y' then press enter.
The next time your machine is rebooted, the system will run a drive scan checking for errors on the drive and repair what it can.
That's step 1.
Next you want to get your data to a new drive, so you will need to put a new drive in your machine along side the existing drive. You will need to connect a power cable from the power supply wiring harness, and an SATA cable between the motherboard and hard drive. (You may need to go into the system setup in order to activate the second SATA port. You do this by pressing the appropriate key to enter Setup when the computer boots. F2 on the Optiplex.
Once you have the new hard drive in, you will need to use cloning software such as Acronis True Image. For this, since the drive you are cloning is probably a system drive, meaning you cannot clone it while you are booted into windows, you will need to create a bootable USB disk or CD/DVD, which can be used to boot to an alternate OS for the purpose of running the cloning software to clone the system drive while the system drive is not in use.
There is a free trial of acronis true image here:
http://www.acronis.com/en-us/homecomputing/trueimage/gettrial/
and instructions for creating a bootable disk here:
https://kb.acronis.com/content/44741
If you decide this is too much work, you should be able to have the same thing done at a local computer shop for around $150 plus the cost of a new drive. (I'd recommend a solid state drive as your new drive). You'll appreciate the performance boost and prices are now pretty reasonable.
Good luck!