When I had major breakdown in my email twice in the past, I removed all the accounts and then re-imported them. The instructions I think can be found somewhere here: http://shadow2531.com/opera/wiki/

Search: "How to Fix a Corrupted Mail Folder":

http://shadow2531.com/opera/wiki/How to Fix a Corrupted Mail Folder - Mail Client ( M2 ) - Opera Wiki.mhtml

Opera seems to have so changed everything I don't know how it will work in the latest version, but it worked back in Opera 12.