What he did was not suicide it was Martydom. Here is a guy who is internally conflicted between his sexual desires and what his religion tells him about having such desires. He feels sinful, guilty and disgusted of himself. Not only would his friends and family and whole community alienate him and see him as a disgusting abomination, he too sees himself as a disgusting abomination. His way of dealing with it is to do something "good" which is to die fighting for Allah. The doctrine of Jihad allows him to kill "American infidels" and die fighting them. His special conflict with homosexuality made him offload that jihad on homosexuals.