Paige VanZant celebrates a 2015 win over Alex Chambers at UFC 191. (John Locher/Associated Press)

As a successful mixed martial arts fighter, Paige VanZant has shown that she’s more than capable of handling attacks in the Octagon. But as a teenager in high school, she felt miserably isolated and under siege to the point of contemplating suicide, and she is opening up about her experiences of being raped and bullied.

“When you’re in that position, when you’re feeling that much pain,” she said on “Good Morning America” on Tuesday, “it’s not that you want to die. You just don’t want to be in pain anymore.”

The 24-year-old UFC strawweight, who recounted her tale of overcoming a difficult childhood in a new book, “Rise: Surviving the Fight of My Life,” said that her time in an Oregon high school was “bad enough that I had to run into the bathroom, and I’d eat my lunch on the toilet … because I just felt too scared to eat lunch in the cafeteria.”

Her longing for acceptance led her to a party when she was a 14-year-old freshman, at which she said some boys got her drunk and then raped her. “They move me around,” VanZant wrote (via MMA Fighting). “They change my position. I fail each time I try to resist, my limbs like wet cement on my body, my brain a heavy fog.

“I am awake and conscious, but my body feels dead. I know what is happening but can do nothing to stop it. I have no voice or choice but to submit and pray that it ends soon.”

VanZant told GMA that although her parents raised her to “know better” and to have some “intuition” about a potentially dangerous situation, “It all went out the window just because I was so lonely, I was in so much pain I just … all I could think about was, ‘Wow, I have somebody who wants to be my friend.’ ”

The bullying only got worse at school in the wake of that experience, VanZant said, as word went around that she’d had consensual sex with multiple partners. VanZant told MMA Fighting that she ended up changing her name from Paige Sletton, because she was being mercilessly teased as “Paige Slutton,” and she came home one day to find condoms hung from trees near her house  “like Christmas ornaments.”

“Through the whole thing,” VanZant said, “I became a totally different person.”  It was about that point she started thinking about committing suicide. “I didn’t see any other way out,” she said.

Eventually, she found that way out through MMA, which she credits with having “saved” her life. “It saved who I was as a person, too,” she said.

VanZant won an amateur fight at age 18, then turned pro and notched a 3-1 record before catching a major break in 2013 when the UFC decided to add a strawweight women’s division, its second for female fighters following the success of Ronda Rousey and others at the bantamweight level. She ran her record to 6-1 before losing to Rose Namajunas, who would go on to upset Joanna Jedrzejczyk last November for the UFC title and who gave VanZant a severe beating.

Eventually, VanZant was forced to submit as Namajunas applied a rear-naked choke but not until the fifth and final round, and VanZant, who had already gained notice for her looks as well as her athleticism, was widely saluted for her toughness.

“While the loss against Rose feels like a living hell, I discover that my grit during the fight did not go unnoticed,” VanZant wrote in her book (via ESPN). ” … In this way, I lost the fight but I won the respect of the MMA community. I keep reminding myself that this means something.”

VanZant lost two of her next three fights, but she also finished second during a 2016 season of “Dancing with the Stars,” a run that vastly raised her national profile. The book could do more for her in that regard, but she said that her main goal is to become “an advocate for anti-bullying” and that she was inspired to complete the “Rise” project after seeing Olympic gymnast Aly Raisman forcefully speak out against sexual assault, including at the sentencing hearing of former USA Gymnastics doctor Larry Nassar.

“It’s like just so comforting that other people kind of took those steps almost before I did, because I’m not the first one,” VanZant told MMA Fighting. “I’m not going to be the first groundbreaking story. I get to kind of follow and learn from how they did it and see that if they did it, I can do it, too.”

“Once this book comes out, if it changes someone’s life, then what I went through wasn’t meaningless, it wasn’t something terrible,” she added. “It wasn’t a tragedy. It was something beautiful and it’s going to be good and it’s going to help people.”

Read more from The Post:

Conor McGregor finally responds to his arrest — with a cryptic emoji

New indictment ties Kansas, N.C. State into FBI’s college basketball probe

After a decade in the minors, this 32-year-old finally got called up by the Lakers

NFL player arrested for joke about packing ‘explosives’ for flight to Hawaii