How can I distinguish if a vision is a demoniacal problem or a psychiatrical one?
Time is the best means to discern if something is a psychiatrical problem or rather is due to the devil's workings. If a vision, locution or anything which appears extraordinary is a mental illness, it will develop inevitably. Psychosis tend to grow. They do not remain stationary. And time ends up developing them in such a way that it eventually remains clear. When someone comes referring to a case of visions and a theologian is asked to discern it, in the vast majority of cases it is absolutely impossible. However, after a few months, even the most obscure cases become clear. If we let an illness follow its course, after a few years, the case becomes clear even for a novice in the matter.
For example, if an unknown penitent kneels in the confessional and tells the confessor that the Blessed Virgin has told him audibly that she loves him and he has to be good, the priest can't know if this person has had an hallucination or a locution. Probably, even the best theologian in the world would not be able to know. But if the priest hears this penitent's confessions for a year, or even less, things will become ever more clear. If the penitent has a mental illness, the illness will tend to grow with time and he will be saying that the Virgin has been revealing more and more things to him, stranger and stranger each time. If you let 5 years go by, the normal thing is that the illness will be clear not only to the confessor, but also to the whole family, since the absurd and illogical nature of hallucinations tends to grow, due to the illness. Mental pathologies, as they advance, become more and more detached from the laws of logic.