The fact that you're asking this means you're not a failure at all but a caring husband, I think she's very thankful. However after birth comes hormonal changes, body changes, it's difficult to keep ourselves in the clearest state of mind. These feelings will probably go away with time but if she shows signs of depression you should ask her to seek help.
just be there, even if there’s nothing u can do. let her know that you’re there for her no matter what, remind her that u love her despite how she feels about herself, give her time to open up n if she gets progressively worse then i would suggest a counsellor but only if she wants to, counselling only works if u want to be counselled.
Maybe bring her to a counsellor? Get some professional help if she continues to feel down.
Talk to her, find out the reason why.. reassure her.. slowly but surely
Find out reason why she lost confidence
Just continue to reassure her ☺️