Saturday Night Live cast member Bowen Yang is opening up about a heartbreaking experience.

The comedian, 29, spoke about gay conversion therapy during a profile in The New York Times published on Saturday. Yang told the outletthat his parents found out he was gay when they discovered “lewd conversations” on his AOL Instant Messenger when he was 17 years old.

Get push notifications with news, features and more.

“They just sat me down and yelled at me and said, ‘We don’t understand this. Where we come from, this doesn’t happen,’ ” he recalled.

“I’d only seen my father cry when my grandpa died and now he’s sobbing in front of me every day at dinner,” Yang shared. “And I’m thinking, ‘How do I make this right?’ This is the worst thing you can do as a child of immigrants. It’s just like you don’t want your parents to suffer this much over you.”

Soon after, Yang’s father told him he had set up eight sessions with a specialist who worked in gay conversion therapy.

“I allowed myself the thought experiment of: ‘What if this could work?’ ” Yang told the Times. “Even though as I read up on it, I was just like, ‘Oh, wait, this is all completely crackers.’ “

“The first few sessions were talk therapy, which I liked, and then it veers off into this place of, ‘Let’s go through a sensory description of how you were feeling when you’ve been attracted to men,’ ” Yang said. “And then the counselor would go through the circular reasoning thing of, ‘Well, weren’t you feeling uncomfortable a little bit when saw that boy you liked?’ And I was like, ‘Not really.’ He goes, ‘How did your chest feel?’ And I was like, ‘Maybe I was slouching a little bit.’ And he goes, ‘See? That all stems from shame.’ It was just crazy. Explain the gay away with pseudoscience.”

After he finished the therapy, Yang’s father allowed him to attend New York University, where the comedian says he went through a “second coming out.”

“I spent freshman year trying straightness on for size and failing miserably,” he told the Times. “I sort of tricked myself into having a crush on a girl but it was just kind of a weird, weird, weird pit stop. Then I would look at a boy and be like, ‘Oh, I want to talk to him.’ “

After coming out to his parents again in college, Yang says he “went through this whole flare-up again with them, where they couldn’t accept it.”

“It never got to the point of, ‘I won’t come home again,’ ” he remembered. “I was just like, I’m not going to argue with them. Like my dad every now and then will be like, ‘So, when are you going to meet a girl?’ And I’ll just calmly be like, ‘Dad, it’s not going to happen.’ I mean, it’s okay. Both my parents are doing a lot of work to just try to understand and I can’t rush them. I can’t resent them for not arriving at any place sooner than they’re able to get there.”

According to the Times, Yang’s parents attended his first show as a SNL cast member last year.

The star joined SNL for its current 45th season as the show’s first-ever Asian-American cast member, and is known for portraying roles such as presidential candidate Andrew Yang and North Korean dictator Kim Jong-un.

Yang first started as a writer during season 44.