The cathartic process of the semi-autobiography

Pete Davidson is sharing how the process of filming his semi-autobiographical movie King of Staten Island helped him move on from his past struggles.

The movie, which comes out digitally on June 12, follows "Scott," a young tattooed man still grappling with the death of his father. The character is loosely based off of Davidson himself, whose own father passed away as a firefighter during New York's devastating 9/11 terrorist attack.

RELATED: PETE DAVIDSON REVEALS PAPARAZZI WON'T LEAVE HIM ALONE SINCE ARIANA GRANDE ROMANCE

In an interview with The New York Times, Davidson reveals he saw the movie opportunity as a way to "just really lay it all out there and be able to heal and move on from it, instead of, every day, feeling sorry for myself. Now we can put that in the past.”

Davidson collaborated on the film with director Judd Apatow who also appeared for the interview, and admitted that he was a little bit wary of putting such personal details in the film.

"Collaborating on this was fraught with the possibility of failure, and I didn’t want to hurt Pete,” Apatow said.

“You’d hate to ask Pete to share something so personal and make the worst movie ever. That was scary, but in a way, it was the motor behind the whole thing: Can we figure out how to be funny and authentic and explore these issues?” he continued.

RELATED: THIS IS LESLIE MANN'S HUSBAND, JUDD APATOW

"It was really hard because it’s stuff I would share with my therapist," Davidson added.

"But Judd really cares, and the hard work that he was doing to find out about my life made me feel so comfortable. He was like, 'I’m going to need pictures of your dad.' I’m like, oh, no," he continued.

In the end of it all, Davidson reveals that the movie ended up being a bit of a love letter to his mother and how he was brought up.

"It was really emotional," Davidson reveals of his mother. "She was in tears the entire time. But she’s the best," he said.

"She’s just like, 'If you need something, I’m here.' Never once has she ever done anything out of character. That was another motivation for me, to make this movie — to give her some sort of a gift, to express myself in a way that I couldn’t show before. That lady’s No. 1. My mom’s definitely a big hero of mine, just like my dad," he said.

"The movie is like my love letter to my mom, and trying to end that part of my life," said Davidson. "I feel like we finally got to a place where we could let go a little bit." 

The movie will be available to rent June 12.

Watch the trailer below!