Though it would seem simple to say that if you went to seek treatment that it would then be doctor-patient privileged info, I’m sure that there are enough “leaks”, and even if you weren’t named, that others might be able to guess, depending on how much is said. That being said, do you have an option to see a therapist outside of that realm? Someplace where you wouldn’t be known, or at least not very well known. It would seem that starting with a therapist, even before telling you wife, would be a good way to go. That way you will have some help planning your future, and be better able to explain things to her when you do come out. I would caution against going beyond therapy before you include your wife, and get her agreement.
Best wishes on getting this settled.