Dealing with disappointment in the heat of the moment is tough.
When you expect success and glory and are instead embarrassed, mortified, or otherwise upset it's a pretty human reaction to get upset, distressed, angry or uncomfortable.
There are a whole lot of techniques and tools that we can apply to the aftermath of such a stressful moment. In that exact moment, though, when you look at your canine partner and think "WHO ARE YOU?" or "I CAN'T BELIEVE THIS" or whatever other negative thought stops your brain from functioning — well what can you do?