The hard drive has failed from a mechanical failure - hardware failure - which means it must be replaced; no software tools or reformatting can fix a mechnically broken hard drive. We know it has a hardware failure because of the SMART failure notice. You can boot and run the unit off a Fireware external, but I wouldn't do it myself personally for a long amount of time. New hard drives are fairly cheap, but the labour may run you up to an hour. I wouldn't do it yourself unless you've worked inside your iMac before. Also, the attempt to install 10.4 did NOT make your hard drive fail - it was just the last straw the failing drive needed - attempting to install something so big. Your hard drive has probably been failing for quite some time now - slowly but surely.
Mac mini (Mid 2011) 2.7 GHz i7, 8GB RAM, Crucial M4 256GB SSD + 500GB + 1TB FW800 OWC Mercury Elite Pro mini
iPhone 4S • iPod nano 8GB • Sound System Audio Engine A2 • Display UltraSharp U2412M 24"