The task of the philosopher: we should bring our will into harmony with whatever happens, so that nothing happens against our will and nothing that we wish for fails to happen.” Epictetus, Discourses.
When something happens that is not in your control, no amount of emotionality – wailing and gnashing of teeth – is going to change that fact. Stop wasting your energy.
Instead, choose how you want to experience the moment and what you will learn from it. In what way can this experience (this lesson, this moment of awareness-raising) help you to experience life more effectively the next time a challenge comes along? As a child faced with disappointment, adults in my life would often say “it is what it is” or “we are where we are”. Now I understand what they meant. The choice is yours.