Well, first of all, may I just say that you are overreacting a little?
It sounds as though you went directly from the shorted out heater right to the computer!
You may have gotten a little jolt, but I don't think that a 25 watt heater would carry enough voltage to kill you. A heater that size is designed to heat a small coil just enough to warm 5 gallons of water over several hours. This is not your vaccuum cleaner, which carries over 100 volts and 12 amps. Water does not hold a current without a source, so without the heater in the water, the water is not conducting any electricity, so you are good to pour it out.
Now, as for the short out...how sure are you the heater was fully submerged? Is it possible the heater may have shifted and floated to the surface? If so, upon exposure to the air, it would have begun heating up as high as it could go...the temperature of the heater as opposed to the temperature of the water would have caused a massive temperature difference so quickly that BLAM! It blew apart. Many of us (myself included) have experienced what happens when a heater is exposed to the air for even a short time, and many of us have had heaters explode. I did not get a shock when this happened, and none of my fish died, so I think that the risk of me dying was fairly minimal.
Now, as to what you could do to avoid this in the future? Purchase a much higher quality heater with an auto-shut off. The Visi-Therm Stealth line is a good choice. These are very high quality, shatterproof, and if accidentally exposed to the air, will shut themselves off rather than go to max heat.
Also, if you are going to put a heater in a bucket without being in the room to monitor it, find a way to make sure it stays underwater. Make absolutely sure it cannot shift and come to the surface.
Overall, don't let a newbie mistake terrify you from the hobby. The better brands are very well put together and very rarely malfunction to the point where they release voltage into the aquarium...even then, death is not a huge probability.