Sharon Salzberg said this quote

Though it may seem counter intuitive to our inner perfectionist, recognizing our mistakes as valuable lessons (not failures) helps us lay the groundwork for later success.