Dealing with your gender is more important than your marriage. You are powerless over your gender. (You are also powerless over whether or not your wife ultimately chooses to stay or go - you literally have NO control over this.)
I told my wife that I would pursue an understanding of my gender issues, whatever the cost and wherever they lead. She understood, correctly, that this meant even if it ended our marriage, which it has done.
You have to be true to yourself first before any of your promises to another have any meaning.
The alternative is a life of misery, and for some of us, possibly death.