It is like Steven Weinberg summarized: With or without [religion] you would have good people doing good things and evil people doing evil things. But for good people to do evil things, that takes religion.
Recognizing this is important for assessing the situation and how to counter the problem – this is not a circumstance where more mental health services will make the tiniest difference. It requires intelligent debate about education, philosophy (including religion), and how to convey to people that any religious beliefs that cause the deaths of others are simply wrong.
Religion is not per se horrible – obviously the super-majority of religious people are fully functional contributing members of society and should be protected just like everyone else - but it has been used throughout history to conduct a huge number of atrocities.