Azula is in my opinion one of the best written Avatar character. She starts out as a distant god-like fire bending prodigy with no sign of weakness. She was unstoppable by team avatar in battle. Her ability to lightning bend with such precision and strength made her one of the most powerful benders in the whole fire nation, even among combat generals among the fire nation army. This combined with her agile combat style and supreme dexterity made her an opponent that always seemed to be one step ahead of every character in the series.
But she is not all fighting either as she was even better at manipulating than fighting. She was one of the most feared leader. She was a skilled strategist who orchestrated the coup over Ba Sing Se and she was the person to stop the invation of the Day of the Black Sun months in advance.
She controlled everyone by fear. The turning point of her god-like status was the moment the fear of her became lower then the love others around her felt for each other. She did not know love is like others in the series. Everyone got someone they really loved, except Azula. Even the thought of her mother loving Zuko more made her furious.
She only knew what she thought was love by being the golden child of her father firelord Ozai. After the betrayal of two of her closest friends the deep harboured mental instabilities became more and more visible. She was crowned Firelord; but I think that she felt deeply empty inside.
Her defeat at the hands of her brother Zuko made her feel so disconnected to who she thought she was, who she thought she wanted to be, that she suffered a major mental breakdown. Because everyone who feared her before now only pities her. She was placed in a mental health institution to recover from this horrible mental breakdown.