In the 2010 film Shutter Island, Leonardo DiCaprio plays Det. Teddy Daniels, a US Marshal investigating a disappearance at an isolated psychiatric facility. However, the truth of the investigation turns out to be far more complicated than he could have imagined; Daniels is, in fact, a man named Andrew Laeddis, who murdered his wife after she killed their children in an act of mania. The grief from this caused him to separate himself from that identity and become Teddy Daniels, a completely different person.
Teddy, as a character, is intelligent and high-functioning; he behaves well socially and emotionally among his peers and with his partner. He suffers somewhat from Post-Traumatic Stress Disorder, the trauma being the drowning of his children, and the subsequent crime of passion when he murdered his wife. At that point, he desperately needed to not be the person who did that heinous deed, and so he became Teddy Daniels - still a US Marshal, but one who is virtuous and idealistic. Teddy represents the positive aspects of Andrew's personality - he is dedicated to pursuing the truth.
Delusional Disorder soon followed, as he began to repress the memories of this terrible event, to the point where he became a different person. His lucid delusions occur frequently, and serve to either remind him of his real crime (the conversations he has with his dead wife) or help to further resistance to his therapy (e.g. Patricia Clarkson's character in the cave, telling him not to trust the doctors).
Over the course of the film, Teddy displays tremendous resistance to the experimental therapy that is being conducted - as soon as he realizes something is amiss, he starts to run afoul of Dr. Cawley (Ben Kingsley) and Dr. Sheehan (Mark Ruffalo), who is masquerading as his partner Chuck. This is typical of patients who undergo therapy, as Freud says: "when we undertake to restore a patient to health, to relieve him of the symptoms of his illness, he meets us with a violent and tenacious resistance" (Freud, p. 355).
Teddy tends to compartmentalize his emotions and inconvenient memories, as evidenced by the segmentation of his personality into Teddy and Andrew alike. "One hardly comes across a single patient who does not make an attempt at reserving some region or other for himself so as to prevent the treatment from having access to it" (Freud, p. 357). Teddy transfers all of his negative opinions and aspects of himself onto the fictional version of Andrew Laeddis, who is described as violent and dangerous. "Transference...if the patient is a man, he usually extracts this material from his relation to his father, into whose place he fits the doctor" (Freud, p. 359). Andrew remains in the preconscious state of Teddy's psyche; always lurking below the surface, but suppressed by his current identity as Teddy.
"at times one has an impression that the patient has entirely replaced his better intention of making an end to his illness by the alternative one of putting the doctor in the wrong, of making him realize his impotence and of triumphing over him" (Freud, p. 359).
Teddy's level of resistance has waned and peaked several times over the course of his treatment - none months before the film, he had come back to reality, but then regressed, necessitating this extreme roleplay treatment. "Resistance is constantly altering its intensity during the course of a treatment; it always increases when we are approaching a new topic, it is at its most intense while we are at the climax of dealing with that topic, and it does away when the topic has been disposed of" (Freud, p. 362).
The rage and guilt Teddy feels over the death of his wife is what primarily drives him to find Rachel Solando; he transfers his feelings toward his wife to Rachel instead, creating a scenario in his mind where he has a chance to save her. "His critical faculty is not an independent function, to be respected as such, it is the tool of his emotional attitudes and is directed by his resistance" (Freud, p. 363).
Teddy's own sense of latent sexual frustration comes to bear in his constant need to save and protect women. The subject of his initial "investigation" is Rachel Solando; he feels the constant guilt over not saving his wife, a clear and established sexual partner; he searches for answers provided by a woman in a cave in one of his delusions, a very clear metaphor for the womb and his desire for security, peace and safety. Certainly, two years in what is likely sexual isolation in Shutter Island has an effect on Teddy's sexual frustration as well, adding to his transference neuroses - "these people fall ill in one way or another of frustration, when reality prevents them from satisfying their sexual wishes" (Freud, p. 371).
Teddy/Andrew Laeddis is a high-functioning delusional with delusions of grandeur and persecution. The primary trauma that led him to this condition was the loss of his wife and children, his wife by his own hand. He attempts to reconcile this and the subsequent sexual frustration by repressing those memories and even his own identity, creating a new one free of those traumas. In order to maintain this identity, he demonstrates significant resistance to any evidence or claim that he is not really investigating anything, and is in fact one of the patients of the island. This happens until he finally reaches a psychological break at the lighthouse, confronted full on with the truth. Even then, the film's ending implies that he will receive a lobotomy, as he never truly broke the Teddy identity at the end of his experimental therapy.
References
Freud, Sigmund, "The Psychical Apparatus" (pp. 13-16) in An Outline of Psycho-Analysis (1989), James Strachey (Trans. & Ed.), New York: W. W. Norton & Company. First published 1940.
Freud, Sigmund, "Lecture 19: Resistance and Repression" (pp. 354-374). Introductory Lectures on Psycho-Analysis (1966) James Strachey (Trans. & Ed.), New York: W. W. Norton & Company. First published 1917.
Scorcese, M. (Director). (2010). Shutter Island [Motion picture]. United States: Paramount.