1. First off all you will need to install official Sony Software, it's called PC suite.
  2. You can download it from Sony Site
  3. Handset must be turned on to perform this operation. Hard Reset SONY ERICSSON W508
  4. When you will install it on your PC, start appliaction and plug in your device.
  5. Now go to Tools.
  6. Then select Phone repair, find and select your device model. 
  7. Go forward with instalation wizard.
  8. At the end of operation device must restart, it may take a while so wait patiently.
  9. Success! if PC suite ended operation u can unplug your handset and use it.

Hard Reset will erase all of your data
All described operations you are doing at your own risk.

Help! This doesn't work