"Shark Tank" star Robert Herjavec opened up about his struggle following his split from his wife of 24 years, Diane Plese. 

The multimillionaire tech mogul revealed he had suicidal thoughts shortly after he and his wife separated.

"I just wanted to end it," Herjavec told People of contemplating jumping from the balcony of a Toronto hotel room. "It's been a terribly difficult year...We were great parents and a great team, but over time we drifted apart."

PHOTOS: Celebs who went from rags to riches

The 51-year-old, who has three high school and college-age kids with Plese, said the hardest part was his children refusing to speak with him after the marriage crumbled.

More On This...

"Everyone has their kryptonite. For me, it was my kids. It took me to a place I never thought I would go."

Herjavec, who is currently competing on "Dancing with the Stars," said he reached out to his pastor John McAuley for help. McAuley turned him to Seattle's Union Gospel Mission where he volunteered at one of the shelter's soup kitchens.

"Nobody knew who I was," the mogul said. "People thought I was a recovering addict...I was hollow and broken and these people saved my life."

MORE: Which 'Shark Tank' star joined the cast of 'Sharknado 3?'

After two-and-a-half weeks of volunteering, Herjavec received a call to join the cast of "DWTS."

Herjavec quickly accepted as the show held meaning for him; he watched "DWTS" with his mother in the hospital when she was battling ovarian cancer that eventually took her life in 2007.

"She loved the pageantry of it," he told People. "I went into this really petrified," he added. "But now I'm thinking, 'I got this.' But we'll see."

WATCH: Break Time: 3rd fiancé dumps Karina Smirnoff