Depends on how involved you want to get.
Wiring and a switch can get you up and running. Kinda messy though.
Here's what I did for my heated dodge mirrors (the actual mirror is immaterial as long as it is heated):
I used a Suburban/Tahoe/Yukon HVAC head which has the rear defrost button:
You must be registered for see images attach
The wiring is already in the dash harness for it. You just plug it in. The rest of the plugins are the same as the pickup HVAC.
Then, install a wire in cavity D9 (it's right beside the door buzzer) of the convenience center under the dash:
You must be registered for see images attach
If you can't figure out which one it is, hook up a 12v test light and when it goes on and off with the HVAC switch; you've found the right connector.
This is the OEM connection for the HVAC rear defrost button and would power the rear defroster grid if you had one. We're going to run a wire out to power the mirror instead. This is also the same place where the OEM heated mirrors would be connected.
Then you just give the other wire on the mirror a ground.
that's it, you're done!
It's installed like OEM and has the timed off function just like factory.
As a side bonus, if you ever change your rear window to one that has the integrated defroster grid you can power it from the same circuit. Just like OEM.
I have a truck cap so I installed a defroster grid on the rear window, ran a trigger wire from the D9 cavity back to a relay and powered the rear grid off the trailer power feed wiring. Works great.
So my most rear-est window is defrosted as well as my mirrors.