Secondly, I empathize with you. I have been upset by dreams as well, sometimes very deeply though never irreparably.
My understanding of dreams is as follows, though I expect it to be correctable. The brain could be compared to an exceptionally powerful computer, and our senses allow real-world information to pass into it's "RAM" (short term memory) in the daytime. A massive amount of information passes through here and we are only consciously aware of a small fraction of it. Another portion is "processed" into subconscious things such as reflexes; for example, if a truck is coming down the road and you jump out of the way.
We also can know things without being consciously aware of them, or without being able to explain them; for example, morality and subconscious interpretation of body language.
The events of the day can then, as we sleep, be transferred from the "RAM" into the "hard drive", i.e. long term memory. They can also be analyzed more deeply, and this, I believe, is where dreams are rooted. Your brain is attempting to make sense of information it was given during the day. You may have been subconsciously reminded of your friend, or something similar. Or your brain could be reflecting emotions.
I do happen to think that some degree of knowledge can be gained from the proper conscious interpretation of dreams, the same way looking at an animal under a microscope can produce new understanding of it's biology; you can now see details that were always there but that you weren't aware of. But, I don't believe that brains can precognate or "tell the future" because there is no way that they could know what it will be. They reiterate and interpret real world info, but because dreams are just a by-product of this process they can be very bizarre and seem very unworldly.
So, the point being, you probably miss your friend.

