What would happen if you took a group of healthy, young people and subjected them to months of sleep deprivation, piles of work, extreme pressure to succeed and hazing from superiors and peers? Oh, and during that time, a single mistake could mean the difference between saving a life or inadvertently killing someone.

That's basically what happens for thousands of Americans each during their medical internship.

After medical school, which itself is super stressful, graduates spend about two years practicing under supervision at a hospital. Reports have shown that many of them face depression, anxiety and other mental health issues.

University of Michigan researchers have been studying the problem for more than a decade, enrolling over 2,000 medical interns from schools around the country every year, then studying how they fare over time.

"During the first year of training, rates of depression [go] up, risk of suicide goes up, anxiety goes up and part of what we're studying is why that is and who's at risk and what environmental elements put them at risk," Dr. Srijan Sen, professor of depression and neurosciences, said in an interview with CNBC.

The problem seems to start in medical school, where a survey found that roughly 10 percent of students had thought about killing themselves within the previous year. This population also suffers from suicide at rates 15 to 30 percent higher than the general population. It continues, and for some gets a lot worse, during the internship.

"We find that many of the interns start out fine, and about half get depressed by the end of the year," said Sen.

Now the study is getting a technology boost. The interns are getting a Fitbit.

Fitbit got involved with the study through its own research efforts, which involve looking at consumer-generated data for signals of depression. The company thinks its data could be useful in analyzing things like sleep interruptions and varying activity levels, which might contribute to mental health problems. If an intern is running on particularly low levels of sleep and exercise, a Fitbit could pick it up.

"We see indications that sleep can get pretty erratic, especially for medical interns who are shift workers," said Jonathan Charlesworth, a research scientist at Fitbit and a trained neuroscientist. "We're seeing that correlate to depressive symptoms."