Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Pete Davidson performed twice on New Year's Eve in Massachusetts, giving his first public performances since posting on Instagram earlier in the month that he didn't "want to be on this earth anymore."

The comedian did a set in Boston and another just outside of the city in Medford. The Boston show at the Wilbur Theater was called Pete Davidson & Friends, according to the venue's website, and Davidson was preceded on stage by at least four fellow comedians.

The "Saturday Night Live" cast member hadn't appeared since scaring fans and prompting the New York Police Department to perform a welfare check on him earlier in the month when he posted to Instagram, “I’m doing my best to stay here for you but I actually don’t know how much longer I can last. All I’ve ever tried to do was help people. Just remember I told you so.” His Instagram account was subsequently deleted.

Davidson, 25, appeared on "SNL" that night but only to introduce the band, and in a pre-recorded sketch.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Davidson, who has been diagnosed with borderline personality disorder, had revealed two weeks beforehand that he was being relentlessly bullied online.

At the sold out Boston show Monday, where cell phone use was not allowed, Davidson reportedly spoke extensively about his ex-fiancée Ariana Grande and poked jabs at Louis C.K., who faced criticism Monday after audio surfaced of a standup routine in which the disgraced comedian made fun of survivors of the Parkland school shooting.

On Grande, who Davidson was briefly engaged to before the pair split in October, the comedian addressed the pop star's song, "thank u, next."

"Here's the thing about the breakup song. Usually breakup songs you know who it's about but you don't really know. That G named all of us," he said, according to E! News. "Bam. She named all of us."

In a line of the song, Grande says, "Even almost got married. And for Pete, I'm so thankful." She released it right before "SNL" aired in what Davidson called "a sad day."

Davidson seemingly referred to Louis C.K.'s controversial routine, saying the day after he got a Harry Potter tattoo, the actor who played Snape, Alan Rickman, died. And the day after he got a Willy Wonka tattoo, Gene Wilder died.

"Now I'm like, alright, that's a coincidence, that's weird. So I'm thinking of getting a tattoo of Louis C.K., what do you guys think?" he asked the crowd.

Fans posted to Twitter that they were happy to see the comedian back in the spotlight.

I was at the show front row and wow it was one of the best things I’ve seen in a while! Haven’t seen Pete smile like that in a long time. — alex (@stewieg88202271) January 1, 2019

LEMME JUST SAY PETE DAVIDSON SHADING ARIANA FOR FORTY MINUTES DURING HIS STAND UP IN BOSTON TONIGHT WAS ICONIC — megs (@megclark150) January 1, 2019

Davidson is expected to return to "SNL" this month, The New York Times reported.