Actually multiple personality disorder, is far too specific and indeed not necessarily applicable. I rattled that post off too quickly.
I think a variety of schizaphrenic conditions can result in hallucinations which might be subjectively experienced as - or indeed have been historically attributed to - "possession by Demons".
I don't know enough about mentall illness or it's treatments to engage any more deeply in this discussion, but I do know that there are indeed circumstances where encouraging someone with certain types of psychological disorders to pray to God for help, could potentially make matters far worse rather than better.