Like most things, failure can be a two edged sword, it can cut both ways. The decision is yours whether it is a negative or positive experience. Either way it is a learning experience and not to be wasted.
Changing out negative view of failure is adjusting the failure goggles from "all-or-nothing" thinking and "catastrophization" to an objective small occurrence, isn't it?