Looks to me like your switch is fitted into a plate on the front of the box. Just get a new switch, if it's a slightly different size then just modify the hole in the plate, or make a new one. Then you can wire it up exactly as before and hopefully it will run as it did before. Fingers crossed it hasn't been damaged.