I came across a great story in one of my non-holy inspirational books, "Complete Idiot's Guide to Zen Living."
Here's a simple way to prove whether a seemingly supernatural vision, thought, presence, or whatever really is other-worldly, or just an emanation of your own mind.
Adapt the proof as desired. There's lots of ways to do what this Zen master advised.
An old Zen story tells of a man whose wife, on her deathbed, begged him never to go to another woman. A few months after her death, the man fell in love and became engaged.
Immediately, he was haunted by the first wife's ghost. Every evening she chided him for disloyalty, describing gifts the man had given his fiancee and repeating details from their conversations. She must be real!
At last the man visited an old Zen master, who suggested, "Take a handful of soybeans and demand this ghost tell you how many beans you hold."
That night, when confronted with the question, the ghost disappeared without answering and never returned. The ghost didn't know the answer because the man didn't know the answer. She was an illusion!
We, too, can become similarly convinced of the reality of things we have created in our minds, when they really are only ghosts of our attachments, guilt, and desires.