Women whom history has deemed as "mad" play an interesting role in pop culture. Some of them are viewed as romantic figures, their stories revered and retold as tragic love. Others are viewed as passive objects, mostly used as props in men's stories. Still others are retroactively diagnosed as "mad" due to their actions, even when men who did the same or similar things were not.
A lot of these ideas about historical mad women are embodied in the story of Juana of Castile (in English, Joanna), often known as Juana la Loca, or Joanna the Mad. She's been the subject of paintings, plays, operas, songs, books, and movies, almost always depicted as the mad woman whose obsessive love for her unfaithful husband led to her imprisonment, for the good of Spain. Sometimes she's accused of necrophilia, other times she's distantly diagnosed as having schizophrenia, with evidence provided by accounts written by people paid by her husband, father, and son to ensure that she was viewed incompetent to rule. She is rarely presented as having any agency of her own, and in an age where Henry VIII was having wives beheaded for perceived and actual infidelity, Joanna's "hysterical" jealousy of her husband's well-known affairs has been consistently presented as "proof" of her insanity.