Splitting
This is a "primitive" defense mechanism. In other words, it begins to operate in very early infancy. It involves the inability to integrate contradictory qualities of the same object into a coherent picture. Mother has good qualities and bad, sometimes she is attentive and caring and sometimes distracted and cold. The baby is unable to grasp the complexities of her personality. Instead, the infant invents two constructs (entities), "Bad Mother" and "Good Mother". It relegates everything likable about mother to the "Good Mother" and contrasts it with "Bad Mother", the repository of everything it dislikes about her.
This means that whenever mother acts nicely, the baby relates to the idealized "Good Mother" and whenever mother fails the test, the baby devalues her by interacting, in its mind, with "Bad Mother". These cycles of idealization followed by devaluation are common in some personality disorders, notably the Narcissistic and Borderline.
Splitting can also apply to one's self. Patients with personality disorders often idealize themselves fantastically and grandiosely, only to harshly devalue, hate, and even harm themselves when they fail or are otherwise frustrated.
Sublimation
The conversion and channeling of unacceptable emotions into socially-condoned behavior. Freud described how sexual desires and urges are transformed into creative pursuits or politics.
Undoing
Trying to rid oneself of gnawing feelings of guilt by compensating the injured party either symbolically or actually.