I also don't think you need to come out, but if you wanted to it would be a good opportunity to bring it up. Anyway, since your problem is "female" related, it would be best to inform your doctor that you are trans so they can help you to get a treatment option that does not put your mental health in danger.
Doctors are held to a confidentiality agreement as others have mentioned, so even if they are anti-trans/ignorant, they cannot tell your family without your consent. They can get in huge trouble over malpractice if they do, and I don't think any doctor would want to risk their reputation just to be an a**hole to a trans person. Also, a lot of places now have a policy of forcing family members/friends/non-essential attendants of patients to wait in the waiting room while they room you. If they do this, you can just tell the nurse you want privacy and not to ask your mom to come in, and they have to respect that under the same rules of confidentiality. (There may be some differences in rules if you are underage, I'm not sure about the specifics but they should respect the same requests as an adult as long as they have no reason to have to tell your mother about something [i.e. you're not in danger of hurting yourself or others, etc.] This may vary country-to-country or state-to-state/province-to-province.) If you feel comfortable you might even ask the nurse to make up an excuse to tell your mother, like she's not allowed in on visits of this nature or something like that. (The nurse would probably be more easily persuaded if you provide an excuse for them to use.)
Good luck!