how to disable iCloud for Earthlink mail
IMAP keeps all email centrally. Deleting from any device deletes all copies, unless you archive them on one machine first.

To prevent IMAP from deleting all copies of its synchronised mail structure, you must first move any emails you wish to keep to a local folder on one machine eg.  from Inbox to a local folder inside "On My Mac".

To recover them, you would have to check either Time Machine - which you can do from inside Mail itself, by selecting your inbox, then from the Time Machine menu bar icon, Enter Time Machine - or see if your ISP has any method of recovering deleted mails.