Everybody is asking how a person could just go into a mall, a cinema, a school, and just fire at random. As somebody who has fantasized about doing this, maybe I can shed some light on the situation.
The most important thing to remember about a random mass killer is that they have a delusion of persecution. They literally believe that the world is out to get them. They view ordinary people going about their lives as conspirators in a massive conspiracy to persecute them. They may view somebody close to them, such as a parent or relative or boss, as a "leader" in the conspiracy. They see ordinary, everyday occurrences as evidence of persecution.
Another thing that separates them is the need to strike back. They feel utterly powerless against the Conspiracy, and fantasize about striking a blow at it, to "punish" it for its crimes. Since the entire world is against them, and everyday people are conspiring against them in their view, it becomes appropriate to lash out at random people to strike a blow at the Conspiracy. One of my favorite mantras during HS was "nobody's innocent". Everybody is guilty of participation in the Conspiracy, therefore everybody must pay.
So, the "intolerable occurrences" build. Finally, they decide that they have had enough, and the Day of Judgement has arrived, when the Conspirators will get what is coming to them. This should not be confused with "snapping", they have likely been planning for months, waiting for the perfect moment. The main emotion felt is anger, rage, frustration, a need to punish people for failing to let up on the shooter. The persecutions simply continued and got worse, in the shooter's mind. People simply didn't listen, and now it's time to PAY! Keep in mind that all this is solely in the killer's head. Mental illness, definitely, but not normal mental illness. Most mentally ill would never hurt random people. The shooters believe they're persecuted, feel powerless to stop it, and fantasize about revenge.