An article at MSNBC addresses how the physical brain utilizes chemistry in the form of dreams to strip the emotional content from memories of painful events. The neurological research helps explain the physical aspects of the dream. But it also in a round about way confirms the psychology of dreams. A sentence from the article:
"It’s like dreams become the brain’s psychotherapist".
Not much different from what I see as the dream being like the body's immune system. Nature has provided both the physical and the psychological psyche with mechanisms to help defend the body from disease.