When you erase a message in Apple's Mail program, it goes into the Mail's trash can. What happens next depends on how you have Mail.app set up.
Open up preferences in Mail.app, then click on the Accounts tab, click on your account in the left frame, then click on the "mailbox behaviors" tab and look at the bottom section of options that pertain to trash. When I do is have that option set to delete the trash after one week. Hopefully, you have that option set up the same way.
If your preferences are set to never delete the trash or delete its contents after a period of time, not upon quitting, then to recover a trashed message, simply open up the trash and drag the desired message into a different folder. Its best to set the preferences for Mail.app to delete the trash after a week, in my opinion.
If you have the options set to delete the trash after quitting mail and you have quit mail since deleting that message, you are out of luck. It is wise to avoid putting messages in the trash that you may want to keep.