I believe there is an option in gmail
under Settings-> Accounts
there is a "send mail as" option
I use fastmail imap to receive my incoming mail from fastmail but when outgoing i use the gmail smpt but i set gmail to send as my fastmail acct. The recipient will reply to fastmail rather than gmail. I hope this helps.