I think it is difficult to identify between demonic possession and other types of mental illness. Sometimes we can pinpoint what causes the mental illness, such as drugs, alcohol, bad childhood/trauma, other bad events in life. I think your friend's mental illness was caused by homelessness, and maybe some church that put that fear in her head. If the mental illness can be fixed by a pill, sounds more like a physical cause. However, if they cannot be helped at all, maybe there is some other factor in play.