I was thinking about this as I was leading horses out this morning. It was a cool, almost foggy morning with a bit of a breeze. As I walked Maisie up towards Lily's paddock, Lily called loudly and galloped to the gate, swishing her tail and snaking her head. When she got to the gate she stood with her chest pressed to the gate and neck arched over, mouthing the latch on the outside - she understands that the snap opens the gate but hasn't figured out how to open it (yet). She was very up, and very ready to move out.
Something that sometimes works for me when a horse is full of excess energy or is nervous, is to lower my energy, and use this to influence how the horse behaves. If a horse is agitated, I find that sometimes matching the horse's energy level or behavior by getting big myself (raising my energy level) only escalates things, whereas if I can lower my energy, the horse will often respond by beginning to relax.
So I worked on myself as I led Lily and Maisie out. I have several mental images I use to lower my energy. One is imagining that totally relaxed feeling just before you fall asleep - your body is calm and loose and your thoughts are quiet. Another is the feeling of sitting under a shady tree on a hot day, enjoying a nice lemonade and just relaxing. I'll bet each of us can come up with our own images of this type. I think about consciously relaxing any areas of tension in my body - this tends for me to be my shoulders and neck. I try to take deep, slow breaths and almost sigh on the exhale - think of when your horse gives a big, relaxing sigh.
Lily spooked once just as I led her out of the paddock, but settled right down - I didn't have to ask her to slow down once on the way out, her head moved lower (her head goes in the air when she's excited or tense and she suddenly becomes Very Big) and we were on a loose lead. When I released her in the pasture, she walked off calmly.
Then I led out Dawn. Yesterday, Dawn was very up and we had to work on our leading, gate behavior and releasing in the pasture. She was up again today, but again I worked on lowering my energy. We did have to pause a couple of times on the way to the pasture - Dawn does not easily relax and tends to carry a lot of tension in her body - but she did much better than yesterday. She walked calmly through the gate, didn't fuss once inside the gate and didn't bolt immediately when I let her go - she took a few walk steps before cantering off.
I try to use this lowering energy exercise when I ride as well - both to relax myself and remove tension in my body so my horse can move more freely and with less tension itself, and also for such things as downwards transitions. The behavior isn't fully automatic for me when a horse becomes agitated, but I'm beginning to use it more often and effectively.