My 2012 Mazda 5 does not have the mirror wires connected to the defrost switch. I took it appart, and measured with a multimeter. I never got around to find where they decided to forgo the mirror hearing wires, the door harness or somewhere else. Try with a multimeter before buying.
icspots, were you able to install the heated mirror on your Mazda5 2012?
Could you please post the results of your wiring research.
I have a 2012 and the mirrors get iced-over too often around here:)