Have Parenting Questions? Ask a Parenting Counselor for Answers
You're not a failure because you're actually accepting the fact that you're not patient with her and it seems that you want to change that. Your daughter is at an age where she's very flexible as she's still learning and developing her sense of self through her interaction with you and others.
You can change your behavior and you may want to let go of the guilt first. You are in control of your own reactions. There will always be times where your daughter tests you or acts in a way you don't like. That is normal whether she's 5 or 15 or 25....
How you go about changing your behavior is totally up to you. It is a process and you're doing this for the two of you; no one is sitting by grading or judging you. You may observe your daughter and how she responds to different directives given both by you and other adults discipling her, you may work with a professional to learn how to better deal with your own reactions and then develop healthier parenting skills.
A democratic parenting style usually works better than an authoritarian one.
Parenting Young Children: Systematic Training for Effective Parenting (STEP) of Children Under Six paperback
My Kid Is Acting Out and I'm About to Shout: Effective Parenting Made Easy audio