Removing a Gmail account on a computer I'm selling
All you need to do is remove that account from the Mac you intend to sell and all your emails will subsequently be deleted from that Mac and no other devices will be affected. To remove the account:


Open Mail Preferences (Cmd + , or Mail -> Preferences)
Select "Accounts"
Select the account(s) that you wish to remove, and proceed to select the minus button below the list of accounts.
Accept the prompt by clicking "Remove".