Anna Salemo lay on the floor of her Stanford University dorm room. She looked at a bottle of antidepressants on her desk and knew that if she swallowed them all, the pain she felt would be over.

She had considered suicide in high school. Usually it was with pills. Sometimes she thought about stepping in front of a bus or a car. She drank, a lot at times, smoked marijuana and abused prescription drugs.

She’d made it past those dark days, though, to Stanford on a lacrosse scholarship as one of the most highly regarded recruits in program history. Yet, here she was again, enveloped in despair, contemplating ending it all.

That was in 2011. Today, Salemo is one of Stanford’s top lacrosse players and the Rookie of the Year — at age 23 — in the Mountain Pacific Sports Federation. She pulled straight A’s last quarter, giving her a 3.5 grade-point average overall.

Some athletes get Comeback of the Year awards when they excel after knee surgery. Salemo came back from what can only be described as a near-death experience.

“She’s one of the best things to happen to our team this year,” said Stanford coach Amy Bokker, whose No. 9-ranked Cardinal defeated James Madison 9-8 in their opening game of the NCAA tournament Friday in Los Angeles.

Salemo’s long road back was a psychological obstacle course. Plagued by bipolar disorder and general anxiety disorder, she took several ill-advised turns. In fact, she nearly went off a cliff.

She had been dealing with feelings of depression since second grade. In fifth grade, thoughts of suicide picked up. She thought it was normal, so she didn’t tell anybody.

“In a funny way it was tied to sports, which is weird,” she said. “I think my parents got me involved in sports as an outlet for all the energy I had when I was little. And it was an outlet. But there also came a point where it was also the source of a lot of my pain.”

Pressure of college sports

The NCAA cites research that suggests that suicide “is the second leading cause of death among college students. Approximately three suicides occur daily among college students, and 7 to 10 percent of college students either attempt or contemplate suicide in a given year.”

Athletes are not more or less susceptible to mental illness than non-athletes, according to Chris Carr, a sports psychologist at St. Vincent Sports Performance, a clinic in Indianapolis. But he says the pressure of college sports can exacerbate depression or anxiety in people who are experiencing such conditions.

“College athletics are very different than what athletes have experienced in high school,” he said. “They’re away from home, and the athletes around them were all the best athletes in their high school. They have a very different experience from what other students are going through. The pressure on them can be great.”

For Salemo (pronounced “sal-EH-mo”), her struggles began well before college. No matter how well she did in sports — the University of Minnesota recruited her as a hockey goalie — in her own mind it wasn’t enough. Trying to escape the hurt, Salemo drank vodka. Ten or 12 shots a day for about three months in high school.

“I thought if I drank out of a shot glass rather than straight out of the bottle, that made me less of an alcoholic,” she said. “Which makes no sense.”

Hidden drug use

She smoked marijuana and took a variety of prescription medicines including Xanax, Ambien, Percocet and Vicodin. She kept it hidden from her parents, her teammates and her coaches.

She had dropped hockey because the pressure of playing goalie was consuming her. Lacrosse was just plain fun.

“There wasn’t a moment that she wasn’t the most tenacious player on the field,” said Sam Bartron, director of the Denver-based Team 180, who had coached Salemo since second grade. “I remember numerous occasions where you’d wonder, ‘How did she do that?’ It was so spectacular. You got goosebumps watching her.”

On the other hand, if she didn’t play well, there was hell to pay — from herself.

“If she missed a shot, you could see the change in her personality,” Bartron said. “That miss was more significant to her than the five goals she scored.”

Like the other people closest to Salemo, Bartron didn’t know what was going on. “I couldn’t get my head around watching her excel in the classroom and in athletics and the fact that it was never good enough,” she said. “‘Come on, find the brightness in life.’ Looking back, we know she was handling mental health issues.”

Intervention in high school

As a senior at Heritage High in Littleton, Colo., Salemo showed up drunk on a Friday night for a school fundraiser she had helped organize. She did the same thing the next night, and this time a teacher busted her. A few days later, school officials conducted an intervention. That’s when her parents, Chuck and Anne, found out about the drinking.

“They knew I’d been drinking before, but they thought I’d stopped,” she said. “They were upset, to say the least. They were pissed off, but mostly they were scared and worried.”

She left the intervention in a police squad car, which took her to a hospital emergency room. She spent 15 days in a psych ward, followed by 2½ months in a drug and alcohol rehab facility called Arapahoe House.

“That’s when I figured out that sobriety was going to be the thing that saved my life,” she said.

She said she’s been sober since.

Although Bartron told Salemo she wasn’t emotionally ready for college, she went off to Stanford. She didn’t last a month.

On the practice field, she was sensational. “She has a very distinct style,” said former Stanford lacrosse and soccer standout Hannah Farr, who entered the program with her in 2011. “She’s super-quick, a lefty attacker. She really played unorthodox. She took a lot of chances. She got super fired up. She would make these ridiculously good plays. She was the kind of player who elevated everyone else around her.”

Getting help at Stanford

Off the field, Salemo was a mess. As she lay on the floor and mulled downing that bottle of pills, she scared herself.

“I had this weird thing going on where I felt I was living in a dream world,” Salemo said. “It felt like nothing around me was real. The doctors call it dissociation or derealization. When you feel that nothing around you is real, that gets very lonely. That’s how I felt. I felt that humans weren’t real.”

Drinking was not an option. “I would rather kill myself than relapse,” she said.

Salemo texted her fears to her dorm’s resident assistant, who immediately told school authorities. She spent 10 days in the psychiatric ward at Stanford Hospital.

“I feared for her life,” said Bokker, who visited her. “She was in a bad, dark place. It was like she was comfortable there in the hospital. I felt super uncomfortable there. I wanted to let her know we cared for her.”

Salemo spent three months in a group home in Palo Alto before moving back to Colorado. After taking the year off from Stanford, she returned to school with a reduced academic load. Lacrosse was out of the picture. Because she wasn’t on scholarship, her parents paid her way that year. And the next two years as well.

Eventually, Salemo made it back to the sport she loves. While attending school full time, she coached an under-13 girls lacrosse team in Menlo Park, then the junior varsity at Mountain View High School and finally, in 2014-15, the varsity.

Taking part in an informal tournament near Lake Tahoe in the summer of 2014 reminded her of how much she missed playing. After consulting with Farr, she approached Bokker after the 2015 season and asked if she could come back.

Salemo hadn’t gone to a single Stanford game in the interim. “I think I was scared of the way it would make me feel,” she said. “I was also scared that (the players) would see me and say, ‘What’s that crazy person doing (here)?’ Looking back, I’m sure they would have been completely supportive.”

Bokker admitted being apprehensive, having seen Salemo fall into the abyss. But the coach welcomed her back on scholarship.

Salemo knew she had to quit vaping, which she took up after smoking cigarettes for a couple of years. She ran a mile every morning to get ready for fall camp.

After struggling in her first game against Notre Dame, she found her groove two games later against No. 16 Ohio State, with four goals and two assists in an 18-7 rout. Salemo led the league in game-winning goals with four. The Cardinal finished the regular season with a 14-4 record, 8-1 in the MPSF.

After lacrosse

Once her college career ends — she won a hardship waiver from the NCAA that will allow her to play in 2017 — Salemo plans to teach high school history or English and coach lacrosse.

She’d also like to counsel teenage girls who are going through similar troubles. “I would tell them my story, how I used to feel I was all alone, that no one knew what I was going through. That’s absolutely not the case, and people need to know that.”

“She is a worker,” Bokker said. “I can see how she’s been able to overcome this disease she had. She’s determined.”

Salemo would tell you determination only gets you so far against demons like this.

“I didn’t do it alone,” she said. “That’s for sure.”

Tom FitzGerald is a San Francisco Chronicle staff writer. Email: tfitzgerald@sfchronicle.com Twitter: @tomgfitzgerald