I don't understand why people read what happened as Danny becoming mad. The fact that she burns Kings Landing after saying months earlier that she does not want to burn Kings Landing does not make her mad. I would go as far as saying she did not change her mind on the subject: she did not want to burn Kings Landing, but she had to. Her one and only goal is to sit on the Iron Throne and reign. When the bells toll, she has not won, she has lost. No one loves her, no one fears her, everyone love Jon and soon everyone through the 7 Kingdoms will know he has a better claim to the Iron Throne than her. No matter what Jon does, it makes her reign basically impossible, or, at best, for show only, because slowly asserting her authority through peace time politics is something for which she is ill equipped. So, her one shot to reign is to be feared. It's not a very good shot, because she will instantly lose many of her allies and get many enemies, but it's a situation she probably can navigate better.
Now, I guess that following a logic that leads to an indiscriminate slaughter could be characterized as a symptom of madness, but it's not what people have been saying.....