Andrew McMahon lived the rock & roll dream. His high school band, Something Corporate, landed a major record deal with Geffen and sold out venues as they headlined a world tour. In August 2005, his first solo album with his side project, Jack’s Mannequin, was poised to be released, kicking off a U.S. tour.

“I remember thinking ‘this is going to happen for this kid,’” said McMahon’s now-wife, Kelly Hansch in an interview for the documentary about the singer’s life.

But at the moment when his upward momentum seemed strongest, the 22-year-old was diagnosed with leukemia.

A documentary chronicling his struggle, entitled “Dear Jack,” will be released Nov. 3. It is a powerful and moving compilation of deeply personal footage Andrew recorded alone in the hospital and interviews with those closest to the singer. During some of the loneliest and most difficult moments, McMahon recalls the camera as the only outlet he could turn to — at one point he confesses his fear of writing a will. The film is so emotional that McMahon had a visceral reaction the first time he saw it.

“I got really sick,” he recalled in an exclusive interview with the News on Thursday, “I had a completely psychosomatic response.”

Along with graphic depictions of medical procedures, the film chronicles McMahon’s life from childhood to the present day.

He grew up in a family that was constantly crossing the country for his father’s job. But McMahon found constancy in music — he began playing piano at 8 years old, and developed remarkable ability just playing by ear.

“I always had music surrounding me when I was growing up,” McMahon remembered, “and there was always a piano around.”

At age 14, the wunderkind needed an outlet for the songs he had written.

“We weren’t planning on being a big band or anything,” McMahon said of his first group, Something Corporate, noting that it was just way of competing in the battle of the bands.

His side project, Jack’s Mannequin, was born of the same need for a creative outlet. Something Corporate had become “stifling.” The idea for the project was sparked by a song he felt wouldn’t fit in with Something Corporate’s repertoire. During a break from performing, McMahon began recording new music about “coming home, and having home be way different than [he] had remembered it.”

At first, McMahon was alone with producer Jim Wirt and a drum machine in the studio, but the project soon attracted Tommy Lee (of Motley Crue) to play drums, as well as a guitarist and bassist.

In May 2005 the band embarked on a U.S. tour. After only a handful of shows, however, McMahon was struck with laryngitis so severely that he was sent to the hospital. The problem persisted and he was forced to cancel a show for the first time in his life. Blood work showed a deeper problem — McMahon was diagnosed with acute lymphoblastic leukemia at 22 years old.

“It was real, and my only option was just to fight it,” he said. “For the first time in my life, my priority was not music.”

For several months, McMahon persevered through treatments including intensive chemotherapy, all the while reaching out to his fans on his blog. He recorded hours of videotape as well — “Dear Jack” is the first public release of this footage.

He kept a remarkably positive attitude throughout, embodying the tattoo on his arm that reads “Be positive” — the life motto of his uncle, who was a role model to McMahon before succumbing to cancer himself.

“Obviously it was important to me — I got the tattoo even before I was sick. Both myself and my family have lived that philosophy,” he said.

McMahon remembers Aug. 23, 2005, as one of the most emotional days of his life; his first solo album, “Everything in Transit,” was released on the same day as his battle with cancer finally turned around when he received a bone marrow transplant from his sister Kate. The album debuted at #37 on the Billboard charts, selling 22,000 copies in the first week.

But the experience proved to be a constant emotional roller coaster — three weeks after the bone marrow transplant, when his body was at its weakest and most susceptible, McMahon contracted pneumonia, but he tenaciously fought his way back to health.

“I have a memory of the first time I felt OK to get in my car and go out on my own. It was a big deal. When you are so sick that you rely on people for everything, freedom is something you don’t take for granted,” he said, describing the moment when he knew for certain that he would recover.

On Dec. 2, reduced to a skeletal frame and tenuously grasping at health, McMahon celebrated the 100-day anniversary of his bone marrow transplant by playing a small, invitation-only show — his first performance in six months.

“The 100 days show was really important to me,” McMahon said, “that’s the benchmark. If you’ve made it 100 days, chances are, you’re going to make it 100 more.”

It was the thought of this concert, that motivated him to persevere throughout the treatment process.

McMahon’s struggle has been the nucleus of several charitable endeavors. Fans began fundraising projects benefiting leukemia awareness, creating enough of a stir to draw the attention of The music powerhouse sold orange wristbands emblazoned with the phrase “I will fight” — a line from one of McMahon’s songs — to benefit his cause.

McMahon himself founded a charity, Dear Jack, to raise money for cancer research.

“The idea came from all the people I saw starting these home-spun charities,” McMahon said, adding that he hopes the documentary will galvanize efforts to raise awareness for cancer research.

The documentary, “Dear Jack,” was a powerful turning point for McMahon. “Once the movie was finished, I was really set free. It closed that chapter of my life.”