When I speak of heavy thoughts and emotions, I mean those from which experience has caused fear, sorrow and hatred. The reason why so many hauntings are surrounded by such heavy thought and emotional dread is because of the means by how a person may have died, or may have lived his/her life. For example, if someone murdered you, you would be filled with so much fear from this act, that this expression will not be allowed to pass through the ego. This is what remains as a ghost. A ghost is not the actual person. It remains as a reflection. This also explains why, during a haunting, people often repeat the events from which they were killed. The energy echoes that most dreadful moment in time.
Of course, if someone died from natural causes, the same idea remains true, much like an unfinished task which the deceased may have regrets for not having made some kind of accomplishment, or has not come to terms (or make peace) with a moment in his/her life.
An act of worship allows the soul to be cleansed, and at death, a ghost would not likely be left behind. When the soul reaches communion with the spirit, and interesting phenomena occurs. The spirit is allowed to speak. The spirit speaks at all times, but an act of worship allows the the spirit to be heard. Remember that the spirit is your higher self, your higher consciousness, and also what people have called God.
When people have made the claim to see god or a divine vision, it's the spirit which is allowed to manifest in this person's life, a direct communication. There's much wisdom to be learned. This communion between soul and spirit is the basis for Magical and spiritual practices.