Mary Todd Lincoln has always been a puzzling, polarizing figure. As a young woman, the well-educated and ambitious Kentucky belle used her charm to help propel her husband to the White House. As first lady, she was initially praised as a gracious hostess and sparkling conversationalist. But extravagant shopping sprees in New York to furnish the executive mansion soon earned Mrs. Lincoln the scorn of the press and much of Washington society, which saw her as spoiled and narcissistic. The fact that she was Southern, during the Civil War, was another big strike against her.

No previous first lady (the term was not even in wide use by 1860, when Lincolns entered the White House) had been the object of such public fascination, or controversy. Mrs. Lincoln was often pale, and frequently complained of headaches or other ailments. Gossip swirled about her stormy moods; she was even said to hit her husband, or to insult him in front of visitors. Abraham Lincoln’s assistant private secretary, John Hay, famously dubbed her “the hellcat.”

Things got progressively worse after Mrs. Lincoln lost her young son Willie to typhoid fever in 1862 (another son, Edward, had died in 1850) and her husband to an assassin’s bullet in 1865. Her youngest son, Tad, died in 1871; four years later, Robert Lincoln had his mother committed to a private sanatorium in Batavia, Illinois. Though a later hearing reversed the finding that she was insane and she was released after several months, later historians largely accepted the idea that Mary Lincoln suffered from mental illness of some kind. As her biographer, Jean Baker told CNN: “Every medical diagnosis has been postulated about her; it runs the gamut from Lyme disease to chronic fatigue to diabetes.”

Dr. John G. Sotos offers a theory that could explain Mrs. Lincoln’s troubles. A cardiologist and technology executive who served as a medical and technical consultant on the TV show “House M.D.,” Sotos was researching a book on Abraham Lincoln’s health when he came across a letter written in 1852, which mentions that Mary Lincoln was suffering from a sore mouth. Knowing that vitamin B12 deficiency can cause mouth pain, he began digging further into the first lady’s health history. Though none of Mrs. Lincoln’s medical records survive to the present day, except for some doctors’ notes from her institutionalization, Sotos used hundreds of letters and photos of the time to build his case.

As reported in his book “The Mary Lincoln Mind-Body Sourcebook” and in an article published in Perspectives in Biology and Medicine, Sotos found that the progressive disease, caused by a B12 deficiency, could explain much of Mrs. Lincoln’s long list of physical symptoms, including weakness, fatigue, fevers, headaches, gait problems, rapid heartbeat, mouth soreness, swelling and vision trouble. In addition, the pernicious anemia could explain her irritability, and the delusions and hallucinations she increasingly suffered in later life. “With any complex disease that affects so many organs, you get a long list of symptoms,” Sotos told the New York Times. “Mary had just about all of them.”

The human body needs Vitamin B12 to make red blood cells and nerves and keep DNA functioning. A deficiency can disrupt this process, affecting the brain, nervous system and other organs. Few serious cases of pernicious anemia occur today, as blood tests can diagnose the condition early on and doctors can treat it. This was not the case in Mrs. Lincoln’s era: Pernicious anemia didn’t even appear in English-language medical literature until 1874, eight years before she died. A diagnosis was an effective death sentence until 1926, when George Whipple, George Minot and William Murphy developed the first effective treatment, in which patients ate a half-pound of raw liver daily to cure the disease. (The three doctors shared the Nobel Prize in Medicine in 1934 for the accomplishment.) Scientists finally developed a treatment in 1948.

According to Sotos, photos of Mary Lincoln appear to back up his theory. Her stocky frame, wide face and jaw and widely spaced eyes are all common characteristics of people suffering from pernicious anemia, though no one knows why this is true. In addition, he points out that Mrs. Lincoln’s parents were cousins with ancestors from a part of Scotland where pernicious anemia has been found to be unusually common.

Despite Sotos’ argument, some scholars take issue in principle with the practice of retrospectively diagnosing historical figures. Baker, for her part, is not totally convinced. She points out Mrs. Lincoln’s enormous energy (not typical of sufferers of pernicious anemia, though the disease is progressive) and said that recently found letters suggest the first lady may have been taking too much chloral hydrate to help her sleep, which might explain some of her mental problems. Other recent scholarship has suggested Mrs. Lincoln suffered from spinal stenosis or diabetes.

But Sotos holds firm that only his diagnosis of pernicious anemia can most fully explain the extensive roster of Mrs. Lincoln’s physical and mental ailments. Above all, however, he hopes his theory will convince many historians to regard Mrs. Lincoln with more sympathy, seeing her not as a manic, crazed harpy but “simply a woman with a biochemically injured mind.”