I think that everyone agrees: parenting IS hard. Unfortunately, we're going to make mistakes every now and then. We are human. Reminding ourselves of that fact can help us put things into perspective.
Personally, I also struggle with parenting. My older daughter is a real challenge for me, and I often question whether or not I'm making the right choices as well. I don't want to mess my girls up! I just try to use things that I learned in college, about psychological development, rather than my own personal experiences to help guide me through. I don't know if that is the right decision to make... but it's what I've chosen to do. Hopefully, I am choosing the right way to go!
Adding my own psych issues into the mix doesn't help things, I know. So, I probably have to put a lot more effort into parenting than many other people. {I don't know if that's true, but it sure feels that way to me.} Anyway, admitting or acknowledging my challenges and then moving forward to focus on what I am doing to counter helps me put things into a healthier perspective. Does that make sense to you? Because if I don't push myself to recognize what I am doing to overcome my issues & be the best mom that I can be, well, I just feel like a worthless caregiver. My younger daughter tells and shows me every week that I'm a good mommy. I am loved & I hold onto artwork in every room. Their pictures, jewelry, and crafts remind me of those positive moments to keep me going through my dark times.
Gentle hugs & best wishes to you.

I'll bet that you're a lot harder on yourself than your children are. Try to remind yourself that you are doing the best that you can & that your children love you.