First and foremost, you must stop panicking. It is common to make mistakes like erasing your data from a hard disk. The best thing to do is use iMyFone D-Back Hard Drive Recovery Expert to recover your essential files. This software is available for Mac as well as windows. The steps to recover your data using it are outlined above.