Remember what is most important in your life. Don't throw it away. Don't make sudden decisions. Take the time to think things over, talk with your wife, talk with your own therapist, talk with a couples therapist if your wife is willing. If you have children, don't do anything that will hurt them.
Kids can take anger, sadness, even the breakup of a marriage.
But they need to know that you love them. If you're fighting with your wife, fight fair. Feel your own pain, but recognize her pain as well. Remember the things that have kept you connected, and honor them. She may find it simpler to think you're totally gay, totally dishonest, totally heartless.