Erica Taylor (Rooney Mara) had been faking her depression. The murder of her husband, Martin (Channing Tatum) was premeditated. Dr. Jonathan Banks (Jude Law) figures out he has been played by Erica and Dr. Victoria Siebert (Catherine Zeta-Jones). Banks uses the threat of medication to get Erica to admit that she was angry that Martin got himself arrested for insider trading and cost them their lifestyle. Erica then seduced Siebert and they concocted a plan where Erica would murder Martin under the guise of being affected by Ablixa while Siebert would short sell stocks in order to make them both rich.
Erica forces Banks to get her released from the hospital, and she goes to Siebert wearing a wire, and gets her to confess to securities fraud and conspiracy to commit murder. Banks, realizing double jeopardy prevents jail time for Erica, tells her he will be prescribing medication that will basically make her catatonic. When Erica objects, Banks points out that as her doctor he has discretion whether or not she is recommitted to a psych ward. Erica causes a scene at his office, gets slapped by Martin's mother (who finding out about Siebert, knows what really happened to her son) and is taken back into custody.
The film ends with Banks reconciling with his family, and getting his life back to normal. Erica is recommitted to a hospital, and is last seen shuffling like a zombie, telling an orderly that she is feeling, "Better. Much better." It is implied that Banks will use his discretion as her doctor to keep her committed for life so she will pay for what she has done another way.