Anyone who has been kicked hard in the balls or coughs up blood knows it is not a good thing - regardless of if u learn how to defend yourself against future ball-shots as a result and end up a "better person".
I think there are two separate issues here: 1.) The actual failure and 2.) the result of the actual failure.
The question is: Is failure ancillary to your primary objective or a symptom of some correctable behavior.
You should identify what in particular are you gaining from failing. It might be something so abstract or so complex that the simple heuristic of failing to succeed is appropriate and any attempt to replicate it or replace it with something other than failing will yield completely different results; Or it may be something so explicit and concrete that you may be able to replicate that benefit and eliminate or reduce the failures to achieve your objective.
Example: You always lose money on a particular stock but then go on to make money on the next. Your long term win-loss statistics follow that path nearly every time.
You assume your initial/first loss is just part of the process.
But ask: In this situation, what do I gain every time I fail? Is it something where I can adjust my behavior to achieve without failing?
Every time I fail, I tend to view the next signal much more statistically. The initial failure helps me to refocus and position size appropriately given a certain level of risk.
In this example failure becomes much less ancillary to success and more of a symptom to of correctable behavior.