That's not at all what happened. This has been foreshadowed for a long time as shown in that article.
She also just essentially lost her lover (Jon's claim to her throne will ruin the relationship), her best friend, 2 of her dragons, her number 1 advisor/most loyal servant who were there to check her impulsive response for violence. It's not like this came out of nowhere, Dany has always had an instinctual response for violence when she is wronged, that has to be checked by someone. See her burning the Tarly's for refusing to bend the knee despite Tyrion telling her not to.
I don't think she is losing it or necessarily becoming the Mad Queen, she's just losing control of her impulses which will lead to her destroying KL and losing the faith of the people who follow her and her advisors.