What you're talking about is a fight or flight reaction. When you feel threatened, your brain prepares for stress by shutting down unnecessary functions like digestion, bladder control, salivation, etc, and boosts heart rate and dilates your pupils and bronchi, because blood flow, air control, vision, and adrenaline distribution take priority in life threatening situations.
Basically, it wasn't because your heart was beating fast that you couldn't pee, but your brain was saying "urination isn't top priority here, survival is."
English
-
Makes sense