Erectile dysfunction /transgender thoughts /relationship issues

Anyone else dealing with ED. My husband and I have been together 8 years. We had issues with this at the very beginning of our relationship and managed to get set them without any help from a medical professional. 2 years ago, husband fell into depression (which he pretty much hid and never said a word). We had sex 2 times in 2 years. I then came to find out he was dressing up as a woman late at night and wishing he was someone else to try and escape reality. I spoke to him at pretty great lengths about everything as he’d took to social media and reached out to transgendered people by private message, posted pictures of himself as a female using photo filters. He had a tights fetish and I found 30 pairs he’d bought himself along with other female clothing items he’d acquired from a friend before we were together when he’d gone through a similar depression and reverted to dressing as a woman in private to “help cope with depression “. We have conceived 3 children together and now we are having issues with ED again. I’ve tried ignoring it, saying something, controlling things, letting him control everything. He can’t seem to get even a little aroused even though he says “he is so horny” and “wants me so bad”. I’m at a loss. I gave him back engagement and wedding band back in August and told him to figure out what he actually wants. I told him that I wasn’t taking his family away or his house. I even said If he wanted to live as a female that was fine. I told him to think about it. Here we are nearly to January literally nothing has been said other than a few days ago when we got in a fight on Christmas. He claims he was going to re-propose and said I screwed everything up. The next two times we had sex he couldn’t get an erection. I’m trying to be understanding as I’m sure he’s frustrated with his body and depressed about not working due to the pandemic. To make matters worse I ended up getting pregnant at the end out November and having an early pregnancy loss at the beginnings this month which he doesn’t know about. I’m fairly certain that would put him over the deep end and I’d never have sex with him again. What do I do?