It could be a sign of mental illness. But religious belief doesn't automatically mean the believer is mentally ill. You could turn this argument on its head if you really wanted to.
For example, what separates sentient, thinking human being from other animals? Surely one of the main things that makes us human is that we are conscious of our mortality, of our future death.
When we look at 100,000 year old Earth Goddess artefacts from Neanderthal burial ceremonies do we conclude they must have been mentally ill or do we conclude that they were intelligent beings because they had religious ceremonies. It proves they could imagine the future, that they were conscious of their future death. It shows they were essentially trying to take some control over the seemingly uncontrollable – i.e. their mortality.
It could be argued therefore that religious belief demonstrates that the species is conscious, sentient, not merely driven by instinct; a being that can imagine the future and is attempting (futile though it may be) to control that future to some extent. In other words, religious belief just makes people feel better. It makes them think they have some control over their mortality.
Of course, this behaviour can become dangerous to both the individual and to society. In this scenario of extremism then the answer your question will tend towards the affirmative. But religious belief per se is not a guarantee of mental illness.
You could compare religious belief to a contagious disease, but that is a s far as it goes. You could compare a joke to a contagious disease, as it too is spread from mind to mind by language. Of course, you can therefore compare all ideas to a contagious disease as all ideas spread from mind to mind by language – but what purpose does such a comparison serve?
Aging and death are pretty gloomy prospects without the emotional crutch that religious belief can bestow upon an individual. To many people their belief system helps them cope with life and the knowledge of future death. So it can be argued that in this scenario religious belief assists their mental health – it helps them to cope with the business of living.
I wish I could believe.