How do I help him?

We have been trying to have a baby since 2016. We had a miscarriage at 6 weeks in 2016 then in 2017 we lost our son at 24 weeks. Earlier this year we had a missed miscarriage at 12 weeks. We started trying again in June no luck in July my husband started struggling with erectile dysfunction it happend 5 days in a row. He has anxiety and I think he's in his head about it making sex even when he wants to impossible. I know he feels like he's letting me down and I'm trying to be patient but I don't know what to do to help him. Any suggestions would be helpful.