Donny Osmond knows more than a thing or two about dealing with fame, given his more than 50 years in showbiz.

The 62-year-old musician is opening up about how growing up in the spotlight can kickstart loneliness at a young age -- something Justin Bieber croons about in one of his latest songs, "Lonely."

Osmond and his famous family grew to notoriety in the 1970s, performing on a variety of shows as a musical performance group. In a conversation that aired on People magazine's TV show, Osmond recalled just how he can relate to the 26-year-old pop star.

"I can really relate because I've been through it and I came out through the other end of the tunnel and I admire Justin because he's changed his life," Osmond told the outlet.

DONNY OSMOND SHARES HILARIOUS THROWBACK PHOTOS OF HIS FAMILY, MOCKS 1970S FASHION

Osmond reflected on his first couple decades in the limelight. He said he remembers "crawling up into a ball" and "crying my eyes out really from loneliness."

A group portrait of The Osmonds in London in 1975. From left to right, Wayne Osmond, Merrill Osmond, Jay Osmond, Jimmy Osmond, Donny Osmond, Marie Osmond, Alan Osmond. (Michael Putland/Getty Images)

"So I know what Justin's going through, what he's been through. And it was at that time in my life, I thought I need to take care of myself," Osmond continued.

Earlier this month, Beiber opened up about his past suicidal thoughts and the importance of seeking mental help. In his song "Lonely" featuring Benny Blanco, Bieber sings, "Everybody knows my past now/Like my house was always made of glass/And maybe that's the price you pay/For the money and fame at an early age."

He performed the song at Sunday's American Music Awards.

Much like Bieber, Osmond said the "hysteria and people screaming your name" can take a toll.

JUSTIN BIEBER REVEALS HE WAS SUICIDAL, TALKS IMPORTANCE OF SEEKING HELP FOR MENTAL HEALTH

Donny Osmond will return to Las Vegas for a residency beginning in the summer of 2021. (Eric McCandless/Walt Disney Television via Getty Images)

"And you go back to pure silence and you're so alone, you can't go out," he said. "You can't show your face, you can't do anything."

Osmond said he can also relate to Bieber in that his love life played out for all to see. He's been married to his wife Debbie Glenn since 1978, but recalled the pair "secretly" dating in the beginning.

"I didn't want anybody to know," he said. "We just celebrated 42 years and she saved my life."

CLICK HERE TO SIGN UP FOR OUR ENTERTAINMENT NEWSLETTER

Justin Bieber performs at The 54th Annual CMA Awards, hosted by Reba McEntire and Darius Rucker. The 26-year-old pop star also recently performed his hits 'Lonely' and 'Holy' at the People's Choice Awards and American Music Awards. (ABC/CMA via Getty Images)

Similarly, Osmond said that now that Bieber is married, he likely "wants to focus on the relationship with his wife."

The legendary entertainer also touched on his own career in music. In 2019, he and his sister Marie Osmond stunned fans when they announced they would be saying goodbye to their Las Vegas residency after an 11-year run. But Caesars Entertainment recently confirmed that Osmond will be back with an all-new show next summer.

"Donny Osmond has achieved a lifetime of remarkable milestones as an entertainer, including countless memories with us during his 11-year run at Flamingo," said Caesars Entertainment Regional President Gary Selesner in a press release.

CLICK HERE TO GET THE FOX NEWS APP

"We're thrilled to welcome him to the stage at Harrah's Las Vegas next summer for an all-new show, and we look forward to sharing many more unforgettable moments with our guests and one of music's most beloved stars."

Osmond promised the new gig will "have an intimate feel to it."