next time it happens, instead of reaching for the power switch, hold down the Command and Option keys and then press Escape (esc)
That should bring up the Force Quit option box. Just force quit Mail.
On that subject, try deleting the preferences and then recreate the accounts. Make a note of all the email settings before you delete the prefs.
Also, create another user account on that iMac, set up your email and see if the same thing happens.
If it does, then the account profile is corrupt.
My wife's iMac. Upgraded from Tiger to SL. She tries to reply to email. Spell Checker wants to check every personal name in the original message. She starts telling it to ignore. it will move through first few, then go into Beach Ball and all is hanged up. only way out is to hold down the power switch! Any Help?