Multiple personality disorder, or simply multiple personalities, is a psychological condition in which an individual exhibits two or more distinct personalities, often with separate memories and periods of control over the body.
Several Star Trek episodes and some fan fiction have touched on the concept of multiple or aspected personalities.
In The Enemy Within, a transporter malfunction divides Captain Kirk into two separate physical individuals, each with a certain set of character traits; one gentle but indecisive, the other assertive but brutal. The compassionate Kirk has to realize that the "wolf" is necessary to his functioning as a starship captain. The two aspects when "integrated" back into a single body help to balance and temper one another.
This idea is also explored in Tuvix, in which aspects of both Tuvok's and Neelix's personalities combine together when (after another transporter problem) their bodies merge into a single individual. "Tuvix" feels that he is a unique individual and wants to stay as he is, and it is only with much persuasion on the part of Captain Janeway that Tuvix agrees to be re-differentiated.
In Diane Duane's novel Spock's World, Lt. Meshav, a Sulamid, is described as having "an octocameral brain, which meant s/he might manifest up to eight personalities. S/he tried to restrain herself from doing this too often, citing (as Jim had heard it put it) 'pity for the poor single-mindeds.' All the same, a poker game with Meshav was an interesting experience, especially considering that one personality was completely capable of hiding the contents of one's hand from all the others...not to mention from any opponent."
In Equilibrium, Jadzia Dax struggles with what appear to be the repressed memories of Joran, one of the previous (unauthorized) hosts of her Trill symbiont. She experiences his memories when triggered by a particular piece of music, and manifests certain of this host's personality traits. Some viewers at the time this episode was first aired in 1994 observed that this episode was an attempt to portray then-popular notions about multiple personality as a form of post-traumatic stress disorder.
In Facets, Jadzia participates in a ceremony in which the spirits of former hosts of her Trill symbiont are temporarily channeled by Kira, O'Brien and the others. The process of becoming accustomed to having more than one self is portrayed in a more normal fashion in this episode, even to the point of portraying Curzon Dax and Odo as liking their co-existence so much they consider staying that way.
In 2375, Seven of Nine experienced something akin to multiple personality disorder when a malfunctioning Borg vinculum tapped into her cortical implant and caused the neural patterns of assimilated individuals to emerge. The symptoms worsened until she began to show a different personality every few seconds, causing severe stress on her cerebral cortex and threatening her life. The crew of the USS Voyager was able to save her life by deactivating the vinculum. (VOY: "Infinite Regress")