Homohpobia and his own self hatred due to his religion prolly was a melting point, culminating in his shooting spree. I don't think he killed those people because he believed he was on some sort of Jihad , prolly trying to persuade himself he isn't gay.