"Internal mail database error." - was anything lost?

In my time on the forums, every time I've seen an internal error for mail all the items and gold from the mail have been collected. If it seems less than you think it is, then that's usually because a mistake was made with an item's price upon putting it up for sale, rather than due to the error.

And it's not always mail addons that cause this! Auctionator, Auctioneer, BeanCounter, and Bagnon can cause this issue as well. Or there's also a possibility that the issue is memory-related, at which point you'd want to do these steps:
Memory Diagnostics: https://us.battle.net/support/en/article/31356
Closing Background Applications: https://us.battle.net/support/en/article/23848

I hope that helps out!