Charlotte is said to have been poisoned before she left Mexico. Once again there are several theories on how and why. According to some, she was poisoned because she meddled too much in political affairs and the men around her wanted to get rid of her. Some claim it was done because an heir was needed and Charlotte was reputed to be frigid - they thought that by drugging her, it would help in the matter. Others claim that it was done out of sheer jealousy by one of Max's Mexican mistresses. It is said to be a poison, known in Mexico, which given in high doses, kills but, given in small doses, makes the victim go mad. All this seems rather fanciful to me but as there are no proof in one way or another, again, who knows ?
As for me, until further proof is brought to light, I will keep on thinking that the blackest and most utter despair caused her to loose her reason. Charlotte had a troubled childhood and her character altered a lot after she lost her beloved mother. She became moody & secretive, would not confide in anyone or let any of her thoughts sweat through. This worried her grandmother Queen Marie Amélie. I think she went through a lot of hardship in Mexico, both public (the Empire was sinking) and private (Max's estrangement from her, her father's death ...). She was lonely and isolated (people around her thought her regal but haughty & cold), with no friend to confide in, and probably depressive.
She was only a woman and, as such, considered a political nonentity (when he realised that she handled public affairs better than he did, Max became very suspicious). Her husband was drifting away from her and she had no children to give a goal & meaning to her existence. The only thing she could cling to was the Mexican scheme. She was ready to bleed & fight for it (hence the memorandum she wrote to Max on the subject of abdication). When it began to loom on her that nothing could be done to save her empire, she must have felt the blow terribly. Besides, she was the one who had forced Max to accept the Mexican crown and probably felt guilty. I think it was too much for her and she simply let go. We are not equal in front of hardship - some people go through Hell and are still able to stand on their 2 feet while other break down at the simplest thing.
There is a very interesting book in French by Laurence van Yperseele called Une Impératrice dans la Nuit. It is a publication of letters Charlotte wrote after she lost her reason. Her failure in Mexico is omnipresent and seems to be coming up in her thoughts again and again. In some of these letters, she imagines that she is turning into a man and says : "To become a man is like being born a second time". Maybe she thought that, had she been a man, she would have been allowed to deal with the Mexican affairs and could have save her empire from ruin. But she was just a woman.
There is still the theory that she was not mad but only pretended to be (60 years of pretence seems a pretty long time though). IMO A sane woman could not have written such letters. Reading them is a strange experience, highly interesting but they almost give you the creep.