I take it you're getting the shock through the handle of the switch?
Sounds like something is shorted to the body of the switch. When you disconnect power to a large electromagnet, which I suspect is what is happening (sorry, I really don't know much about overdrives, specifically), you can get a spike of voltage.
So, I'd suggest checking the wiring at the switch, to make sure no wires are resting against its body. If that's OK, I'd replace the switch. Any ordinary toggle switch of about the same size and current rating, which fits the hole, should work.