Gmail cannot read mail from external IMAP accounts.
Instead, you can set the external account to forward to Gmail, or just use POP.
If the external account supports IMAP, but not POP or forwarding, you're out of luck.
I'm not aware of any such email providers.
You can kinda do it through gmail.
What you can do is (and I do this) have a "slave" account, which is an account you want to use that uses gmail, but you don't actually check this one, and a "master" account, which is the one you check and can send emails from as master and slave.
First open up your slave account, go to settings > forwarding and IMAP/POP
Set the account to forward all mail to your master account.
Next head into your master account, settings > Accounts and Import
in the send mail as: section, click the Send mail from another address button, add in the slave account's information. It will ask you to confirm in the slaves account (which should be forwarded to the master account, so check the master inbox), click the link and continue.
Following that, in the same settings> account and import, check the when receiving a message: reply as same address the message was sent to so that things will automatically be sent by the same account that received it.
Now you're good to go. If you want to, you can create a filter that puts anything to the slave account in it's own label, so you can easily see what account the message was to.
Best Answer
Without more details, I think that the best option is to do the bulk operations in http://mail.google.com just before you could left alone your Thunderbird instance for several hours, as the sync process could take "a while" and consume "a lot" of resources of your computer.
References
How actions sync in IMAP - Gmail Help
Deleting IMAP messages - Gmail Help