For Melanie, it was a matter of millimeters.
That was the difference between feeling only slightly better, to knowing that she could start her life over again and emerge from 14 years of debilitating depression that included suicide attempts, months of hospitalization, every medication under the sun and more than 40 electroshock therapy sessions.
Melanie, a 37-year-old from Toronto, is one of the more than 200 people with depression to receive deep brain stimulation, or DBS, in which twin holes are drilled in the skull and two electrodes are guided to an area deep in the brain to stimulate it with pulses of electricity.
Unlike almost every other patient, though, Melanie, who asked that her last name not be used, has had the procedure done twice -- and that created a critical difference.
When her first procedure was carried out at Emory University in Atlanta in October 2009 by a team led by DBS pioneer Helen Mayberg, it provided her some relief, particularly more normal sleep patterns. But she said when Dr. Mayberg evaluated her, "she knew something was changing, but it was not as pronounced as anyone had hoped."
Over more than 10 years of work with this technology, Dr. Mayberg said in a recent interview, she has identified what she thinks is a critical spot to which to guide the electrodes. It is in a deep brain structure known as the subgenual cingulate, or Area 25, which is overactive in many people with chronic depression.
The electrical impulses seem to quiet that area, but it is also important that they be able to stimulate bundles of nerve fibers running to other parts of the brain, and when she examined Melanie's brain scans, she found that her electrodes were not in the ideal position.
She suggested Melanie undergo another DBS surgery, in July 2010. Melanie was willing, but she went into the second operation thinking it probably wouldn't help. "I appreciated them wanting to try, but I had sort of resigned myself that this was as good as it was going to get."
In the second surgery, she was kept partially awake so doctors could gauge her reaction to the current being turned on. When they first did that, "I wasn't feeling anything when they asked me questions, and I think I started having this impending feeling of, 'Here we go again,' and then all of a sudden I felt myself take a really deep breath and there was this sense of something lifting away.
"I always felt like there was noise in my head yelling all the time, and it just got quiet for a second. I felt my brain relax, and then I noticed how many people were in the operating room, and I felt I could see clearly, where before everything had sort of been a fog all the time."
She really knew what a difference it had made, though, when they turned the current off temporarily so they could complete the surgery, which involves snaking the wires from the electrodes beneath the scalp and down to twin stimulator packs beneath the clavicles.
When the electricity stopped, she said, "I felt bad. It was as though it all came rushing back like a crushing grip."
While DBS is still experimental, there have been enough cases that researchers already have coalesced into two large groups in their philosophical approach.
One group, led by Dr. Mayberg, thinks that the pessimistic moods and thoughts of major depression should be the primary target of DBS. Area 25, which seems to control those feelings, is the area she focuses on.
"This area activates with negative mood. It's at a junction point that connects to many regions that are implicated in depression," she said. "What you're trying to do is turn negative mood and psychic pain off, and to me, all the other symptoms of depression are connected with that."
Other DBS psychiatrists are more concerned with patients who cannot get any sense of enjoyment in their lives, and they have aimed the electrodes at spots like the nucleus accumbens, a brain area associated with rewards and pleasure.
The University of Pittsburgh participated in early trials of DBS for depression, but is not doing such work now, officials said.
The big test will be trials underway now to compare DBS and a sham version of the procedure in the same kind of patients. In the sham version, the electrodes are implanted but not turned on. The U.S. Food and Drug Administration is likely to approve DBS for widespread use only if it shows substantial improvement over the placebo therapy.
Melanie had first considered DBS several years ago, but her family had been too afraid of her getting brain surgery.
Eventually, though, she was so desperate that she moved to Atlanta for six months with her brother's help so she could get the treatment.
She was frightened, but not because of the surgery itself.
"The scary part is that every time you try something new, you tell yourself there's a possibility you can get better, and hope is a very dangerous thing to have, because it never worked. After you sign up for brain surgery, there's probably not much left for you to try after that."
Now that the DBS is working properly, Melanie said, she can start to undo the bad habits she had developed after 14 years of just trying to survive.
To get through each day during that long emotional winter, she had stopped trying to develop relationships with people, and would go hours without speaking to anyone.
Now, with the DBS creating a new normal, she is working hard to engage with life again.
"I'm not easy to live with now, and I'm not perfect, and I still have a lot of work to do, but DBS is in some ways a miracle for me, and I feel like I've been given a second chance."
Correction, Dec. 15, 2013: Earlier versions of this story incorrectly cited how long ago Dr. Mayberg began work with DBS and misspelled the word "subgenual."
Mark Roth: email@example.com, 412-263-1130 and on Twitter: @markomar.