Your mental health will not survive staying married.
To be honest, the issue isn't that you're gay. The issue is that you're no longer attracted to him, do not ever want to be sexually intimate with him again and are subsequently incompatible.
Being gay is not the end of the world - although I know that it is scary, very scary, and can be very painful.
But you're allowed to be attracted - and not attracted - to whomever you are. Your sexuality is a fu dame real part of who someone is, however, it's only as big a deal as you make it. For some people it is their identity and for others it's just one (relatively boring) part of many that comprise who they are.
You don't need to give him details and if he's homophobic and you're afraid of his response you actually don't need to give detailed reasons: "I've fallen out of love with you" would be a truth, right?
Your DC will also be fine. Being gay doesn't mean you stop loving and taking excellent care of your child(ren), just like getting divorced doesn't.
None of this is easy and I don't want to imply it is. Maybe it's not all quite as horrific as you're thinking either.
People are saying to break up with him for his sake. Sure, don't drag this out, but do it for your own sake: you don't want to be with this partner. The reason why is almost irrelevant at this point. It will become relevant when you start looking for a new one.
Big hugs.