In Freudian theory splitting is a defense mechanism where the ego divides into one or more parts to attempt to deal with anxiety. One part remains fully conscious and is experienced as the real self, while the other may become unconscious and projected onto an object (a Freudian term that includes another person).
When a split-off aspect of the ego is projected, the object is often unrealistically seen as alternating between being “good” and “bad.”
Wikipedia sums up
Splitting (also called black and white thinking or all-or-nothing thinking) is the failure in a person’s thinking to bring together both positive and negative qualities of the self and others into a cohesive, realistic whole. It is a common defense mechanism used by many people. The individual tends to think in extremes (i.e., an individual’s actions and motivations are all good or all bad with no middle ground).¹
It should be noted that Freud, himself, did not coin the term. Instead, one of his followers, Ronald Fairbairn developed the concept in his object relations theory. Freud, however, did write about the idea of splitting, especially in regard to fetishism and psychosis.² — ¹ https://en.wikipedia.org/wiki/Splitting_%28psychology%29 ² http://braungardt.trialectics.com/sciences/psychoanalysis/sigmund-freud/splitting-of-the-ego/