Try rebuilding your mailboxes.
Mail (El Capitan): Rebuild mailboxes
If your accounts are IMAP or Exchange and your messages are still located on the mail server, this will redownload the missing messages. If your account is POP and rebuilding does not work, you will need to restore messages from a backup such as Time Machine.