First, when an application won't quit, it's usually not necessary to force a system shutdown. Select Force Quit... from the Apple menu instead.
Back up all data if you haven’t already done so. Before proceeding, you must be sure you can restore your system to the state it’s in now.
In the Finder, select Go ▹ Go to Folder... from the menu bar, copy the text on the line below into the box that opens, and press return:
Delete the selected file. Relaunch Mail. It should re-index your mailboxes. Then rebuild the mailboxes (Mailbox > Rebuild.)