Hi Sam. I'm sorry you're still having this problem. I used to have it but it just went away. I can't remember the last time that the annoying jumping mail icon made me want to chuck my Mac out of the window. I know this doesn't help your situation.
I'm on 10.7.5 - which might be different for you.
I don't think I did anything specific other than delete all my keychain entries for all my mail accounts then re-enter them via mail preferences. Be sure to make sure that they stick in mail preferences - sometimes they don't save.
I also changed some of my BT/Yahoo mail account passwords and made sure that they didn't have upper case letters as the first character. This was on the advice of the BT help desk who seemed to be aware of this problem with Mac mail.
I wish I could be more help - I know how frustrating this is. Have you tried creating a new location in Network Preferences with no DNS lookup? I don't know why this might work in your situation - but it sometimes makes my mail work when I'm logged into hotel wifi and have mail problems. Note I'm not a techhie - just trying to help.
Finally - I don't think that Apple staff read these boards. Have you tried contacting Apple support directly? I found them very helpful when I had a problem with Finder.
Good luck with this. Wish I could be more help.