If you could disassemble the Mirror housing and detach the wires from the mirror end, you might be able to reattach the wires to the Switch and then reattach the wires to the mirror then reassemble the mirror into the housing...Or...

... buy a replacement mirror/cable/switch assembly that is complete.

I have never taken one apart. I simply found one complete and functional off another car in a junkyard.