Comedian Chris D’Elia is speaking out for the first time in months since denying allegations of sexual harassment.

In a YouTube video posted Friday, D'Elia said his past relationships were "consensual" but admitted that after months of therapy he now understands that his attitudes and actions around sex was wrong.

"I stand by the fact that all my relationships have been consensual and legal. That's the truth. I, through this kind of time away, I've seeked out a lot of medical advice, therapy and stuff like that. What I have come to understand is this was always about sex to me. My life was sex, it controlled my life," D'Elia says.

The comedian goes on to acknowledge that he "had a problem" and still does.

CHRIS D'ELIA REPLACED BY TIG NOTARO IN UPCOMING NETFLIX MOVIE FOLLOWING SEXUAL MISCONDUCT ALLEGATIONS

"It's not like months down the line everything's better. I need to do work on that," D'Elia said.

The funnyman, who is 40, reflected on his thirties spent traveling to perform standup. He admitted he "felt lucky" at the time because his notoriety made it easier to find women to have sex with.

"I felt like 'Oh wow, I don't need to work as hard. I can just do a show and then have sex or roll into a city and look at my inbox and then just start writing,' and I did, man," D'Elia admits.

"I would get at least 50 messages a show each city a night and I would reply to all of them. I thought in my mind that being straight up with these women was the right thing to do. I'd say, 'Hey, come to my hotel room and let's have sex. Let's make out. Let's do this, let's do that.' And that was what I thought was right."

 COMEDIAN CHRIS D'ELIA DENIES SEXUAL HARASSMENT ALLEGATIONS, 'KNOWINGLY' PURSUING UNDERAGE WOMEN

D'Elia also confessed that he's cheated on "most of the girls I've been with," including his current fiancee. "And this is my dream girl. This is the girl I want to be with for the rest of my life and even that wouldn't stop what I was doing," he said.

"I realize through all of this that doing that is just treating sex like it's casual and being flippant with people. That's not the guy I want to be, it's not OK, and I'm sorry for that. It makes me feel shameful and it makes me feel bad," he adds.

D'Elia said that he's committed to continuing recovery and acknowledged he's working on putting in the work so he can be a role model to his son.

CHRIS D'ELIA'S 'YOU' CO-STAR PENN BADGLEY ON COMEDIAN'S SEXUAL HARASSMENT ALLEGATIONS: 'IT'S VERY DISTURBING'

The comic first addressed the allegations of sexual misconduct against him last June.

Chris D'Elia apologized for his past attitudes toward sex in a YouTube video posted Friday. (Michael Schwartz/Getty Images)

"I know I have said and done things that might have offended people during my career, but I have never knowingly pursued any underage women at any point," D’Elia said in a statement Wednesday.

"All of my relationships have been both legal and consensual and I have never met or exchanged any inappropriate photos with the people who have tweeted about me," he said.

CLICK HERE TO GET THE FOX NEWS APP

The standup comic added: "That being said, I really am truly sorry. I was a dumb guy who ABSOLUTELY let myself get caught up in my lifestyle. That’s MY fault. I own it. I’ve been reflecting on this for some time now and I promise I will continue to do better."

The comedian began fielding heat from users on Twitter after one woman came forward with allegations on Tuesday that she couldn’t fathom D’Elia being cast "as the pedophile" in Netflix's series "You."

CLICK HERE TO SIGN UP FOR OUR ENTERTAINMENT NEWSLETTER

He was also replaced in post-production of a Zack Snyder movie by fellow comedian Tig Notaro and dropped by CAA .