There's a spectrum between "I failed -- awesome!" and "I failed -- I will stop trying". I think articles like this are trying to push us away from the second end of the spectrum, not necessarily push us to the first.
There's also an art to realizing you've failed (or are going to fail), and making the best outcome possible from it. Many things don't work out the way you expect them to first time. Things may initially be "failures," but maybe ultimately be some form of "success."
But failure can also be a message that you're doing the wrong thing.