New York Islanders goalie Robin Lehner says an in-game panic attack this past season while with the Buffalo Sabres helped lead him to sobriety.

In a first-person account written for The Athletic, the veteran goaltender says he experienced a panic attack during a March 29 start against the Detroit Red Wings.

"When zero finally hit (at the end of the second period), I walked back and sat in the trainer's room," Lehner said. "I could barely get my gear off. I broke down. I was having a major, full-blown panic attack. I thought I was suffering a heart attack. I had no idea what was happening. I could not go back on the ice."

Lehner says that after the intermission he was sent home, but on the way he stopped to buy beer, and after a night of drinking he told his wife, "I have to go away."

Lehner never played another game for the Sabres. Instead, he went to rehab, where he says he was treated for addictions to alcohol and drugs and diagnosed as "bipolar and ADHD with PTSD and trauma" as well as having manic phases.

While at the treatment facility, Lehner says, it took three weeks for him to detox, and after that he began to deal with a personal battle that was "now complicated by my own childhood experiences of abuse, addiction and mental illness."

Through treatment, Lehner says, he came to realize that his mental health issues not only affected how he carried himself off the ice and with his family but also his play.

"With those manic swings, I could see the pattern." Lehner said. "When I was hypomanic and in a good mood, I was a solid goalie. The depressive state, not so much."

Though he was released by the Sabres in June, Lehner says he still has a good relationship with "incredibly supportive" Buffalo general manager Jason Botterill, who Lehner says reached out to check up on him a few times during the summer.

Having signed as an unrestricted free agent with the Islanders in July, Lehner, 27, enters his ninth NHL season ready to "battle what's in front of me" and is looking forward to playing a sober season of hockey for what he says will be the first time in his career.