If there is something in our lives that isn’t going as planned, it can make us feel like a failure. This can be particularly true among students and academics since the those in academia already suffer from rampant imposter syndrome. There always seems to be someone smarter than us, better than us, achieving more than us, having an easier time.
If this is our perception, then it will manifest into reality. We will only see our own lacks and shortcomings.
But if we can change our thinking slightly it will serve us greatly in our own lives. Instead of viewing negative things as a failure, view them as a lesson. What do you stand to learn from this situation? Is it serving to teach you patience? Strength? Humility? Is it an indication that you may want to consider a different path of study or career, if you are truly unhappy with what you are currently spending your time doing?
There are no failures; there are only lessons. Even just taking the time to feel into that idea will help you shift out of negativity a little bit more. Not out of delusion, but as a deliberate attempt to change your perspective, feel better, and make use of every situation presented to you.