I don't think there's a stock script like that but it should be easy to do. Try this as the main script for the item you want to destroy (modified version of doorremote.fpi):
;Artificial Intelligence Script
;Header
desc = Remote Controlled Detonation
;Triggers
:state=0,activated=1:state=1,destroy
Of course you'll need to set it up as an explosive item for this to work, otherwise it will just disappear.
Once you've set that up, just put the name of the thing you want to explode as the Activate If Used property on your switch and it should work. I didn't test it tho, so let me know if it doesn't work and I'll play around with it.
It compiled! Ship it!