I would get http://www.grc.com/sr/spinrite.htm
before attempting a defrag. It's possible that a defrag would cause data corruption. It might be simpler to replace the hard drive.
First i would get - http://crystalmark.info/?lang=en
to find out what is triggering the SMART error, post the problem here and get whatever data you need off the hard drive then it's up to you what to do with it but i would either get a diagnostic program from Western Digital's site or replace the drive. SpinRite might fix the immediate problem, but it won't fix any physical problems that might be present on the hard drive.