The 18-year-old Disney actress discovered her diagnosis during her three-month stay at arehabilitation center in Illinois, where she was treated for anorexia, bulimia and cutting.
"I never found out until I went into treatment that I was bipolar," Lovato told People. "Looking back it makes sense. There were times when I was so manic, I was writing seven songs in one night and I'd be up until 5:30 in the morning."
Lovato has recently opened up about what shecalls "the darkest time" in her life, discussing in depth her struggles with self-mutilation and eating disorders.
In an interview that will air Friday on "Good Morning America" and "20/20," Lovato said her lifelong depression wreaked havoc on her body.
"[Cutting] was a way of expressing my own shame, of myself, on my own body," Lovato said in the interview. "I was matching the inside to the outside. And there were some times where my emotions were just so built up, I didn't know what to do. The only way that I could get instant gratification was through an immediate release on myself."
Lovato also said she was bullied at school, and discussed her decadelong "unhealthy relationship with food," saying she started compulsively overeating when she was only 8 years old and later began starving herself.
"I was performing concerts on an empty stomach," she said. "I was losing my voice from purging. I was self-medicating. I was not taking medication for depression, and I literally was so emotionally whacked-out that I took it out on someone that meant a lot to me."
Lovato blew up and punched a backup dancer while on tour in South America with the Jonas Brothers. It was, she told Seventeen, a nervous breakdown.
"I was really bad off," she said. "My parents and manager pulled me aside and said, 'You need to get some help.' It was an intervention. I