A big topic of discussion around Azula is usually what kind of mental illness she has, I tend to discuss that zaidi and put less talk into the reasons for her losing it.
I've always seen it as a combination of things. She was raised in a broken nyumbani with a banished mother and a banished and burned brother. I’ve always imagined that her father was very verbally abusive and put a lot of pressure on her to be perfect. And for a while she was perfect, but the dakika she Lost grip on that she started to slip. She was betrayed kwa both of her Marafiki and then very shortly after that blow her father tossed a crown she wasn’t ready for at her. Azula also didn’t have a guiding figure like Zuko did (no Iroh nor Ursa) to help her unlearn some of the worser behaviors that Ozai and her nation instilled in her. kwa the end of the onyesha she had zero support.
The main reason I think that Azula went crazy was because she was basically set up to fall right from the beginning, she just didn't realize it. As a child her only guidance was Ozai who pretty much instilled it into that she had to be perfect. He raised her zaidi like a solider than a daughter. Pretty much all of her beliefs are ones she shares with Ozai, no doubt this was intended kwa him. In essence she was indoctrinated kwa her nation. One of Azula's main issues is that she functions so poorly in an everyday social setting. She doesn't know how to talk to people so she didn't have many friends.
Which leads to when her mental health really started to decline. She was betrayed. Not just kwa Mai and TyLee, but I'd say Zuko as well. I'm not going to say that they didn't have good reasons to leave her, because she did give them a great many of them. But them leaving took its toll on her. Zuko when he left and confessed that he didn't kill the Avatar likely showed her that she didn't have as much control as she thought that she did. It probably did sting at least a little to have her own brother turn on the family and jiunge Aang, even if it was for the best. I can't imagine that Ozai took that one well. It was probably part of what lead him to leave her being on the siku of the comet.
But even before that, we see another place where things went south for Azula; she Lost Mai and TyLee. The two people she trusted the most. Finding out that they were no longer afraid of her was a huge shocker for her. A while back Grey DeLisle did an interview wherein she notes that Azula used fear to keep her Marafiki because she didn't think that they'd like her any other way. So after them, she no longer had fear on her side either. This put her completely alone, which was a major set up robber falling apart. It was also an indicator that she was losing control which in itself probably my alarmed her as she was very big on control. Unfortunately for Azula, this lapse in control led to another.
Which leads to the inayofuata point. That she was already slipping when the crown, an empty title kwa all means, was tossed her way. She was only 15; 15 and just Lost her closest companions. She was in no position for zaidi pressure and yet her father put the weight of the moto Nation on her and then left her on her own. And the way he did it is worth noting. In that brief seen we see him take her through a range of emotions; sadness, anger ("it was my idea to burn everything to the ground!" "You can't treat me like Zuko."), fear (in the book companion to the episode she expresses that she's never raised her voice at him and wonders what he is going to do to her), and then hopefulness as he hand her the moto lord title. He is very obviously toying with her head.
To go with the attention her father gave her she had a distinct lack of motherly love, au at least she thought so. She brushed it off and made it seem like it wasn't a big deal but in the finale it becomes evident that it does bother her. The best way to hurt a pair of siblings is to play vipendwa and the moto Nation family is about as dysfunctional as it gets. Hints were dropped earlier on that her mother's opinion bothered her. If they didn't her mother probably wouldn't have showed up in her hallucinations. Bottom line is that Azula didn't really have much genuine upendo and I think that it eventually helped to break her.
With her mother taking care of Zuko came a lack of guidance. One of the reasons I think that Azula lacked so much empathy is because the only person who really brought her up was Ozai who raised her on war and battle. Now I'm not saying I completely fault Ozai and Iroh because Ozai did a very splendid job isolating her and corrupting her child's mind to the point where she isolated herself via fear. I feel as though Ozai wouldn't allow for Ursa and Iroh to intervine and help Azula to be a better person. My issue with them lies in that they didn't really try and that Iroh seemed quick to write her off as a Lost cause even when there was distance between she and Ozai. Azula displays signs of sociopathy because she was raised to be apathetic and she didn't have that wisdom Iroh bestowed upon Zuko nor the genuine example she and displays of upendo that Ursa gave him. All of this lead to Azula being unable to maintain her friendship which began the fall of the dominos.
And finally one thing that very clearly didn't help is that mental illness isn't well known in the Avatar world. The fact that it seems misunderstood probably makes her illness that much worse. It induces zaidi fear in her to know so little about her own situation and what's going on with her. Which probably didn't do her paranoia any favors. I can't imagine that hallucinations are a commonplace talked about thing so that probably made her confusion even worse.
Basically Azula was kind of screwed from the start but didn't even know it. And she had little help along the way because she isn't exactly the most approachable person. I just hope that because she's still so young that she has a chance to get the help she needs and recover.