Two narratives are being pushed in this thread and I don't understand why it can't be both.
1. He was clearly radicalized by ISIS and/or other terrorist groups
2. He clearly had an obsession with LGBT, which, right now, seems to be related to some sort of suppressed feelings related to his sexuality and/or mental state.
It looks like it was both, yeah. The second and his possible self-repression may have led to the first.
It seems even more tangled than that, to me. Not that one led to the other, but that they fed on each other. The guy's father clearly practiced a poisonous, extremely homophobic iteration of his religion, and that influenced his loathing as much as any inherent "self-loathing" did. All of that hatred turned back to that radical religion his father practiced, it seems.
I think it's important, when we talk about the effect his possible repressed homosexuality may have had to do with this, that the only reason that becomes a problem is because of the hostility to LGBTQ people in broader (majority) straight society, not because of some inherent capacity for LGBTQ people to loathe themselves.