I think that by definition, ANYONE that wants to shoot/stab/behead random people , and follows through on that urge, has mental health issues. Maybe I am wrong. But I think you are possibly mentally ill if you can actually behead someone for religious or political reasons. I don't understand why that is a ridiculous assertion.
My younger brother is schizophrenic/bipolar. He lived in a group home for decades. I had Sunday dinner there many times. People living there were almost always on working meds and were pretty stable and steady. But there were back stories about how they ended up there, during times they were off their meds, or untreated. And it often involved doing desperate, impulsive and violent things based on passionate beliefs or notions. My brother is 'violently' a vegetarian. When he is off his meds, he threatens to harm anyone physically that he sees eating meat. Says he is going to stab them with a steak knife and see how they feel. He has been pulled off people before when making that threat.
He is adamant about his beliefs in a rather extreme, desperate, aggressive way. In some ways he could be labeled a terrorist. He is on his meds and they have been working for decades,, thank goodness.