Depersonalization disorder (DPD) is a dissociative disorder in which the sufferer is affected by persistent or recurrent feelings of depersonalization and/or derealization. The symptoms include a sense of automation, going through the motions of life but not experiencing it, feeling as though one is in a movie, feeling as though one is in a dream, feeling a disconnection from one's body; out-of-body experience, a detachment from one's body, environment and difficulty relating oneself to reality.
Occasional moments of mild depersonalization are normal; strong, severe persistent or recurrent feelings are not. A diagnosis of a disorder is made when the dissociation is persistent and interferes with the social and occupational functions necessary to everyday living. Depersonalization Disorder is thought to be largely caused by severe traumatic lifetime events including childhood sexual, physical, and emotional abuse, accidents, war, and torture. Drug use may be a mitigating factor. It is unclear whether genetics play a role, however there is evidence of physiological factors with respect to DPD.
Depersonalization disorder can be conceptualized as a defense mechanism as the core symptoms of the disorder are thought to protect the victim from negative stimuli. Depersonalization disorder is often comorbid with anxiety disorders, panic disorders, clinical depression and bipolar disorder.
Although depersonalization disorder is an alteration in the subjective experience of reality, it is by no means related to psychosis as sufferers maintain the ability to distinguish between their own internal experiences and the objective reality of the outside world. Sufferers are able to distinguish between reality and fantasy, during episodic and continuous depersonalization, and do not represent a risk to society since their grasp on reality remains stable at all times.
You may read more here: http://en.wikipedia.org/wiki/Depersonalization_disorder