You can use Data Rescue (99USD) to scan your HDD and recover lost data. It will work most of the time, unless the data has been overwritten, so I recommend stopping any kind of write activities to your iMac's HDD.
You might need to use another Mac or boot from an external HDD to scan your internal HDD.