I think persistence is a very important skill for children (and adults) to have. There are kids who are just very good at persisting in the face of failure, but that is a skill that can be developed and learned.
My husband and I both volunteered last year in my son's second grade public school- I did math and he did reading. (Our public school is ranked in the top 10% of California schools; high income, high-achieving). Several kids would say to us when we tried to get them to do the little worksheets or write sentences, "I can't do it." At one point, my husband sat down with this little boy and said, "yes, you can. You can write your name!" This went on for awhile, and usually the boy would do the work. We thought, as did the teacher, that this boy and several others weren't dumb; they just weren't able to hunker down and get it done.
Not surprisingly, I guess, that boy and the others who couldn't persist as the work got harder were invited to do voluntary summer school at our school. Some kids in the class were not any smarter, but they somehow had developed skills where they could persist until they got done what they needed to do.
I think having your child do sports or a musical instrument, for example, can be good ways for them to learn persistence in the face of failure. My son is hearing impaired and extremely bright- I have always told him that he might have to work harder than the other kids to keep up, if he doesn't hear at the same level, and he has been able to (usually!) do that.