edit: I can't prove it, but there are many purpose built certified forensic drive duplication devices (read: very expensive devices that will hold up in court) that use GNU ddrescue. There is other special sauce (hardware write blocks), but underneath it's Debian and GNU ddrescue doing the bulk of the work.
I usually go the ddrescue route right away. I can see the argument for copying the data you know you need first, but going the ddrescue route you only need to read the data once.
Photorec did a great job of recovering an SD card for me when Recuva had given up all hope. That and ddrescue are the only recovery programs I use now.
Maybe you should take a look at ddrescue then, It can skip blocks and has resume support.
* sys-fs/ddrescue Available versions: 1.24 ~1.25 {static} Homepage: https://www.gnu.org/software/ddrescue/ddrescue.html Description: Copy data from one file or block device to another with read-error recovery
Seconded. You'd need another Mac and a Thunderbolt cable, and possibly an external drive if the other Mac doesn't have oodles of free space. There's no better way, short of pulling the drive out.
​
Clicking is very bad. It is the drive controller trying repeatedly to seek to particular locations, failing to read them, snapping the heads' arm back to home position, and trying again. If you have access to another computer, a TB cable, and enough free space for the entire problem-iMac's hard drive, I would recommend ddrescue. It's a terminal program, but apps like Finder and Time Machine will just fail or have the clicking drive endlessly loop, failing to back up the first problem file they find, and further damaging the drive in the process. On the other hand, ddrescue is designed to quickly hop past damage and get as much as the dying drive will allow, as quickly as possible.
​
ddrescue: decent micro-intro. old [so use brew, not macports] but great intro, plus good comment or two. GNU page for ddrescue. • From experience, never leave off the part where you choose to save a log/map file to the working drive, do ignore most of the options though, and never mess with in and out points. Good luck with it.
Look into free data recovery software perhaps, or boot into a live Linux environment and try from there.
Unfortunately I can't really recommend any particular software because I haven't had to salvage a dying drive in a long time [backups!] but an advanced user's method would be ddrescue from Linux.
If the drive has bad blocks and other tools have failed, you may want to look at ddrescue. You will require a *nix based OS (eg. macOS / GNU/LINUX) to perform the copy.
You should still be able to boot Linux from a live CD or USB. From there you may be able to recover your files. There are at least three parts of the hard disk which need to be intact before you can boot the OS:
I have no way to know which of those you may have destroyed. These may help: