I know you will do better next time. In order to provide the support and encouragement a child needs, you need to understand the real meaning of the child's experience. Failure should be viewed as unavoidable and as a learning experience. Your child may be viewing the failure as letting you down, or as proof that he will never succeed. Appropriate questions can be asked to help guide the child toward positive growth.
Successful people try to evaluate the outcome rather than focus on the win or loss.
Follow these questions with more encouragement to try new experiences. When your child experiences a failure, assure her that it's okay to make mistakes. Mistakes are a part of life. Be ready to share some of your mistakes as well. Affirm their feelings.