Maybe you gotta virus. If you have Norton on cd maybe you can change your bios to boot from cd. Then run the anti-virus against the drive. Just an idea.
Maybe it has overheated.
Since its already spoilt, why not give this method a go?
As it connects and disconnects, it means that its still about to run for a short period before overheating and going down again.
Keep it at a low tempertaure ( place it at the air condition or something ) then connect it via a external casing to your PC and transfer everything ASAP.
Yes your hd can be save.but for a cost.You will spend lot of money to restore your file.Search on google.There is a software that will retrieve your file.They will offer a trial ware so that you will see if you can retrieve your file.