I have been using a late-2009 iMac (21.5") (it was running the latest pre-Sierra update, I do not remember the exact OS version) for somewhere in the area of six months now and have, overall, had no issues with it. However, two weeks ago, it failed. The story surrounding this apparently sudden failure is that I was running an update of Safari that involved needing to do a restart. Immediately after doing the restart, the electricity for our home went out, it was only out for around a minute. Luckily the computer was plugged into a surge protector... Or not.
Later that day, when I tried to turn it on, it turned on but wouldn't boot passed the Apple Screen with the small, gray progress bar.
It is still basically in that same state. However, after some reading on the internet and trying a variety of things booting to "Command+S" as well as "Command+R". What happened when I ran "Command+R" was somewhat depressing. The Mac is completely unaware of the fact that it has a 500GB Western Digital HDD in it (which I can hear turning) and if I run Disk Utility, it will spend hours looking for that drive.
What I tried today was reinstalling the OS (failed), booting it with SpinRite and booting it from a 64GB external drive (worked). Once I booted to the external drive, I ran disk utility which I started at around 1400 hours, it is now 1500 hours and it just now found its hard drive. A warning popped up and indicated that the drive could not be repaired. I am now running First Aid on it, just curious to see what if anything it can do there.
I do not totally know what my question here is. Other than, if what I am trying right now doesn't work, what should I do? Should I just give up and drag the thing to an Apple Store? I have data on it that I must recover (sadly I had nothing backed up).
To Summarize: If what I am doing right now doesn't work, what - if anything - can I do next? Are there any other at-home fixes I can try before taking it to an Apple Store?
Note: I own one other Mac that is exactly the same as the one that is not working, I also own portions of 38 other older Macs and part of a broken one that is also this computer's twin. (I added this in case anyone recommends any form of testing, or needing certain parts).