If the HDD isn't being detected at the BIOS level, and you're sure that there are no bad connections, then I'd say it's time to start looking for a new hard drive. I'd definitely try it in another system first if possible, though, since if your power supply voltage somehow became unstable, a lot of new(er) drives will detect that as a failure and refuse any drive access requests. If it does, then something might have gone wrong with the SATA controller on your motherboard.
I'd say that the system freeze was caused by the drive failing - modern drives likely won't be damaged by an unexpected shutdown. That's just my opinion based on the information you've given.
EDIT: I almost forgot. Before you try replacing anything, reset your BIOS by clearing the CMOS on your system. There should be either a jumper or button on your motherboard that will do this... I'm sure the documentation can tell you where it is. If you can't find that, you can accomplish the same thing by unplugging the system, removing the small battery cell on the motherboard, and holding down the power button for a few seconds. Doing this will clear all of your BIOS settings, so be prepared to re-enter the time, date, and anything else you changed manually back into the BIOS. It may sound strange, but this has fixed a lot of problems when something strange goes wrong out of nowhere, and is generally the first thing I try since it's fairly easy to do.