Amy Sussman/KCA2021/Getty Joshua Basset
He told the outlet he initially thought he had food poisoning, but his condition was actually something that almost killed him.
"[I] started getting very ill, and it kept getting worse," the songwriter said. "I thought it was, like, food poisoning or whatever. It got worse, it got worse, it got worse, it got worse."
That's when Bassett was hospitalized after experiencing "unimaginable pain." He was admitted on Jan. 14 - the same day he released his single "Lie Lie Lie" and a few days after his co-star Olivia Rodrigo released her breakout hit, "Drivers License."
Bassett didn't get into the specifics of what caused the septic shock and heart failure, but told GQ, "I'm sure stress had a part in it."
"[The doctors] told me that I had a 30 percent chance of survival," he said of the severity of the diagnosis. "They told me that if I had not checked into the hospital within 12 hours, I would have been found [dead] in my apartment."
Rich Fury/Getty Joshua Basset
During the time of his hospitalization, the HSMTMTS star was also at the center of rumors that Rodrigo wrote "Drivers License" about him.
Bassett told GQ he brushed it off because he "didn't have any energy to be able to focus on anything but staying alive."
Never miss a story - sign up for PEOPLE's free daily newsletter to stay up-to-date on the best of what PEOPLE has to offer, from juicy celebrity news to compelling human-interest stories.
Fans first learned about Bassett's health issues on Jan. 14 - the same day "Lie Lie Lie" dropped - when he posted a video of himself on Instagram in a hospital gown.
"Welp... not the first place I assumed I'd be on my 'Lie Lie Lie' release day... the ER!!" he wrote in the caption, assuring fans "it's not Covid."
"After an unknown, uncomfortable feeling turned into, times 10, the worst pain of my life, I figured I'd just try to sleep. After multiple, very very ugly days and nights, I had no choice today but be taken to the hospital,' he explained, adding that the docs had dubbed him, "the sickest patient in the hospital."
Days later, Bassett opened up about his recovery after undergoing emergency surgery, reassuring fans that he was "feeling much better."
"Getting very excellent care and definitely on the mend," he told his fans in an Instagram Story post on Jan. 19.
The HSMTMTS star added that he is "really grateful to have so much support in this time" and "looking forward to getting back to work."
RELATED: JoJo Siwa Opens Up About Coming Out as LGBTQ: "This Is the First Time That I've Felt So Personally Happy"
Meanwhile, elsewhere in his GQ interview, Bassett said he was happy he recently came out as a member of the LGBTQ+ community.
"I stood behind every word that I said," he recalled, of an Instagram clip he posted last month.
The star said the moment gave him "an opportunity to say something that I believe in," and that he is "at peace" with his own sexuality.
"Even if there are consequences, I would much rather deal with consequences and live my truth than live in fear," Bassett said.
As for the pressure to define one's sexuality, "There are plenty of letters in the alphabet ... why bother rushing to a conclusion?" he said.
"Sometimes your letter changes, sometimes you try a different one, other times you realize you're not what you thought you were, or maybe you always knew. All of these can be true."
"I'm happy to be a part of the LGBTQ+ community because they embrace all," Bassett continued. "Don't let anyone tell you love isn't love. They're the ones who probably need it the most."