Based on stories about Ludwig and his brother Otto I wonder if the Wittelsbachs (in particular the mainline) were prone to mental illnesses as bipolar, depression and so on.
Sisi clearly suffered from some disorder, I am not sure if you can call it mental illness. She could not emotionally connect to anything - not to her husband (who was stuck in Austria), to a place, to her children, to her role as empress, her family (never went to her dad's funeral) ... She seemed to be running without real meaning.
She was 15 when she met FJ and the engagement was announced two days later (!). That was how it was done back then and nobody could see that she would not be able to adapt to any of the roles life had for her (mother, wife, empress ....). In fairness I think she tried initially until she gave birth to a son and got so overwhelmed that she tried to escape and went to different places just to be away from it all.
She also did not have a good connection to herself. I remember I once read in a biography that a doctor was called because she was feeling so bad - she weighted only 47kg and the doctor told her that she was suffering from the "poor people disease" - hunger - she did not perceive her body starving and went on losing weight until it got really critically.