So first off, what if you applied the same question to sexuality? We could easily argue that gay people are 'mentally ill' and need to be 'treated.' In fact, for years in the United States, that's exactly what we did. Gay people (and trans people) were frequently [subjected to electro-shock therapy to 'cure' them][]. We can even take it further than that. If I come by my political beliefs by reason, then surely anyone who disagrees with me politically must therefore be insane. So maybe we should give those damned INSERT_POLITICAL_PARTY_HERE electro-shock too, right? Just until they see our way of looking at things.
Clearly, there's a line somewhere between treating someone's disease and treating _who they are_. Some argue that that line is 'posing a danger to oneself or others,' but that brings up the confusing subject of assisted suicide, which is a whole other discussion. There's also some that argue that we only treat 'abnormality' and 'normal' is simply whatever the majority of people are, but that doesn't really solve either of the cases above, because trans people, gay people, and political dissidents are generally speaking the minority everywhere. There's also lots of other possible rules that don't really makes sense either.
Personally, I'm inclined to believe that there currently aren't any good answers to these questions and there won't be any until the field neuroscience advances. When we can look at people's brains and genuinely study how they work, a lot of stuff becomes more clear. In the case of transsexuality, [some brain structures have already been identified][] that exhibit one pattern in women and another in men and tend to match along a person's _identified_ gender rather their _assigned_ gender. That provides some evidence for the concept of _neurological sex_ which was already a topic of discussion among researchers in the area of gender studies even before these structures were identified.
So, what do these structures mean? How does gender work in the brain? How does anything work in the brain? Where is the line between sane and insane? Honestly, I don't know, but I think we'll have a better idea in a few decades, and until then, let's just try to be understanding and compassionate with our fellow human beings.
[1]: https://www.amazon.com/Whipping-Girl-Transsexual-Scapegoatin... [2]: http://www.huffingtonpost.com/jamie-scot/shock-the-gay-away-... [3]: https://en.wikipedia.org/wiki/Causes_of_transsexualism#Brain...
There's a fantastic book about this written by Julia Serrano called 'Whipping Girl' [2] that goes over these things and more and describes these phenomena as 'Transmisogyny' - trans individuals being subject to both misogyny and misandry depending on the situation, and sometimes both when it's convenient.
[1] - https://freedomforallamericans.org/legislative-tracker/anti-...
[2] - https://www.amazon.com/Whipping-Girl-Transsexual-Scapegoatin...