Sometimes we mix up our sense of self with some external feedback. A failed project, suffering relationship, lost job.
You are not a failure because something failed. You are simply the creator (or a part of) something that failed. It doesn’t define you, just as you don’t define it.
Remember that, even after failures, we keep going.