I think that if you try to force yourself into a "politically correct" mindset (one that refuses to acknowledge that there is a problem - a conflict between how you see them and how they see themselves) then you are more likely to find it difficult. Just telling yourself that you have to change your mindset - your sincere belief that there's something wrong with them - isn't going to help you in this situation.
In my view the way to work through it is to start with what you know: that you love this person as a sibling. Forget everything else for the moment - what you
should be thinking and what you
should be feeling - and just concentrate on that. This is someone who's meant a lot to you in your life and that they have trusted you with this information and not tried to cut you off speaks volumes about their regard for you.
So what if they had a "mental illness"? A lot of people do in life, and plenty more people have behavioural and psychological quirks that would fall into a disorder spectrum. It's immaterial whether you approve or not of these things - you can't will them away - so if you want to continue to be that person's friend then you have to learn to accept that as being part of the spectrum. Say if it was a physical rather than mental irregularity: what if your friend was blind? It wouldn't matter much whether you loved or hated that about them, it's just something that's part of their existence. You might not want to cheer and say "good for you!", but they wouldn't much appreciate you being morosely pitying about something they just view as being something that makes them a bit different.
As far as your friend is concerned, it is
you who is blind, not them: you see a boy; they see a girl. They just want to fix everyone else's eyesight so that when you look at her, you see a girl, just as she does when she thinks of herself. Like the transformation, though, it won't come overnight but be a long process over a number of years. That works to your favour - you'll have plenty of time to get used to it. In that time, your friend will have to undergo a lot of therapy, so she'll be in the best of hands - the therapist will find out about any underlying traumas or conflicts that your friend is not discussing with you. There might not be any at all. Gender isn't quite as cut-and-dried as we like to think it is - some people are born with male and female six organs, and sometimes that isn't even obvious. An estimated 1% of live births have some measure of gender ambiguity - which is a surprisingly high number to me. Only 1/10 of those are obvious enough to raise questions of whether later medical intervention (gender assignment) is necessary - in many cases the ambiguity is very subtle, or not externally noticeable at all. Conversely, the American Psychiatric Association's Diagnostic and Statistical Manual of Mental Disorders does list transsixualism as a gender identity disorder (GID), and specifically differentiates between GID and intersix (hermaphrodite) conditions. This in itself is controversial, since there is a campaign to remove GID from the Manual of Mental Disorders, on the basis of it being an inherent trait rather than an illness. GID is more normally associated where there is an element of distress in the conflict between assigned six and self-perception.
Wikipedia says this:
Psychological and biological causes for transsixualism have been proposed. Some people consider research into the "causes" of transsixualism to be based on the assumption that it is a pathology, an assumption that is rejected by many transsixuals. Others think of the condition as a form of intersixuality, and support research into possible causes, believing that it will verify the theory of a biological origin and thereby reduce social stigma by demonstrating that it is not a delusion, a political statement, or a paraphilia. Note stigma has a role to play in the development of and adherence to both viewpoints. [...] A few studies based on small samples suggest that transsixualism might be associated with a difference in the human brain called the bed nucleus of the stria terminalis (BSTc). In one study, the BSTc of male-to-female transsixuals and cisgender ["normal"] women were similar. Those of heterosixual and homosixual men were similar to each other and different from those of women (cis- and transgender). Another study suggests that transsixuality may have a genetic component.
Even after nearly a century of gender reassignment, and millennia of people living as a different gender than the one into which they were born, it's still something we don't know a great deal about. We are naturally worried about the things we don't understand - this is normal and natural.
There's just one thing you
do know: that you love your friend, and that she loves you. Whatever else you need to know, you'll figure that out in good time.