How to restore apple mail to a new gmail account

I use Apple Mail to backup my Gmail account by doing a nightly backup clone of my iMac onto an external drive.
Assuming that my GMail account is hacked, or that some other reason I am compelled to open and transfer my activities to a new gmail account, how would I restore the gazillion emails stored in Apple Mail into my new Gmail account ?
thanks very much for your time and help