Religions like Islam and Christianity feel that demons can live in your body and affect how you act and they describe that as possession.  Grades of possession are assumed but you are not given an answer to, "What if we all have a level of being possessed and do not realise?  What if the spirit only acts through us rarely?"  Exorcism is the prayer that God may respond to by ejecting the demon or demons.  Medical Science does not recognise possession or exorcism.

This is not, though some say it is, about being afraid of encouraging people with say depression who hear some devil or spirit telling them to kill somebody perhaps their child that the message really did come from some entity capable of possessing them.  A demon can be inside you and do nothing but audibly tell you to do evil.  Depression is no barrier to possession nor is psychosis.  So the person does not know where any message comes from.  That is where the danger is.  A person does not need to be able to prove where the voice comes from in order to act on it.  We are made to listen to voices.  But talk of demons gives the voice a better chance of being seen as possibly a real voice.  The person may act on the order perhaps to prevent the demon maybe taking reprisal on her or him for disobedience.

Psychiatry holds that mental disorder must be only diagnosed if there is a condition that is causing an important level of upset or dysfunction.  If you were speaking in tongues and this was disturbing you would be regarded as needing a clinical diagnosis and professional help.

It does find there is illness present in possessed people but denies this should be assumed to be demons or that the possession is real.  The American Psychiatric  Association says,

Possession-form identities in dissociative identity disorder typically manifest as behaviors that appear as if a “spirit,” supernatural being, or outside person has taken control, such that the individual begins speaking or acting in a distinctly different manner. For example, an individual’s behavior may give the appearance that her identity has been replaced by the “ghost” of a girl who committed suicide in the same community years before, speaking and acting as though she were still alive. Or an individual may be “taken over” by a demon or deity, resulting in profound impairment, and demanding that the individual or a relative be punished for a past act, followed by more subtle periods of identity alteration (2013, 293)

Speaking in tongues is regarded as culturally acceptable and relatively harmless which is why bizarre behaviour alone is not enough for a diagnosis.

But it is obvious though that such activities could be a sign of future problems or be part of the potential for creating them.

Demonic possession is not a recognised mental illness. The Diagnostic and Statistical Manual of Mental Disorders does not recognise possession by demons as medical diagnosis. It is not therefore a recognised psychiatric disorder. However there is a form of delusion called demonomania or demonopathy in which people think they are demons possessing a body. They mistake themselves for the demons. Those who suffer this illness have dissociative identity disorder. Around 30% of sufferers have demonomania or demonopathy. In possession, the person often claims to be the demon and acts accordingly.

There are no peer reviewed medical articles or journals that advocate exorcism.

Diagnosis is a problem - many people with mental illness have been mistakenly diagnosed as possessed. Some exorcists admit they are not sure if the person is mentally ill or possessed and still proceed with an exorcism. It is accepted that you can be mentally ill and possessed at the same time. Diagnosis in medicine based on what symptoms the person reports and are observed by others only if there is no way to get hard evidence - such as in a poor country. With exorcism, the diagnosis is based purely on what the victims and their friends or family say. Those people are rarely educated the right way or unbiased - they are not great witnesses. And as they will get away with it, they feel they can lie and exaggerate. And if people fear a demon in their midst their imagination will run away with them. Exorcisms were far more common in the past because people did not have the tools for diagnosing anything properly never mind possession or a need for an exorcism. Overall, the belief has hurt and harmed. There is tremendous pressure on people who realise that a family member is not really possessed to say nothing against any exorcisms that are performed on her or him - they don't want to look like insane fanatics and fools who are responsible for what the family member is suffering as a result of belief in possession and exorcism.

If psychiatry is unable to find out what is wrong with the person, that does not prove that the person is possessed. Arguments such as, "I don't know what is wrong therefore it is probably a demon", show that you want to believe the person is possessed - you want to use the victim to make a religious point. No decent or sane psychiatrist would approve of exorcism or facilitate it.

Some possessed people have been diagnosed as mentally ill. Their possession is considered to be a separate issue from their illness. Where can the line be drawn? It is hard enough to do that without bringing demons and the supernatural into it.   Individuals with a known history of diagnosed psychotic and psychiatric symptoms will still be subjected to exorcism if the priest and the Catholic doctor decides that her or his problems are down to some force other than the illness.

When many parts of the world legally prohibit the teaching of creationism as if it were a scientific theory in schools (it is banned in England and Wales for example) it is mind-boggling how schools can be allowed to teach that demons possess people and exorcism evicts them.

It is possible to recognise possession but not exorcism.  They can both be rejected on principle.  Medical professionals recognise neither.  It is even possible to regard exorcism as valid if there is no possession if positive outcomes can be validated but even that route is rejected definitively.