How do you stop hating yourself?

Nikki • Mother of two angels & 1 rainbow baby, Lillian.
I had a miscarriage in April (had a D&C April 20th). I should have been 12 weeks. I just got my period for the first time since the surgery this morning. 
Losing the baby was the worst thing I've ever experienced. I thought it would get a little easier as some time passed, but even 2 months later I'm still devastated and depressed. I hate myself. I feel like it's all my fault. My husband did "his part," but my body wasn't good enough to keep the baby alive. I couldn't protect it. 
We are trying again and hopefully we get pregnant again soon. Maybe some light at the end of the tunnel will help? But...I can't stop hating myself for being a failure. How do I stop feeling so miserable??? 
It doesn't help when 90% of my friends are pregnant and a new Facebook pregnancy announcement every few days is like a dagger to the heart...