Clean off the accessible battery leak areas with a cloth rag.
Spray the switch with Cyclo Silicone Oil Spray a little every 5 minutes and use/work the switch slowly until the oil that comes out is clear. This ensures that the corrosive battery chemicals have been displaced by the silicone oil.
Use/work the switch on top of tissue paper a few times. Change tissue paper and let switch dry on top of new tissue paper to absorb excess silicone oil for a few hours.
Make sure there's no more excess silicone oil on the switch before installing it back in your flashlight.
Silicone oil spray is the thinnest/lowest viscosity silicone oil available in my place and it dries to a very thin film. Silicone oil does not "eat up" rubber and plastic parts unlike other petroleum-based oil products and is used to protect car battery terminals from corrosion. Good luck!