"Shark Tank" investor Kevin O'Leary.
"Shark Tank"/ABC
One of Kevin O'Leary's first business partners taught him a lesson that became so crucial to his success that he's taught it to every entrepreneur he's mentored.

O'Leary, an investor on the hit show "Shark Tank," briefly worked at Nabisco after receiving his MBA in 1980, but decided to build his own television production company, Special Event Television. There was a point when there was "a huge problem" with the business and his partner and cofounder Gerry Patterson, a former sports agent, told him he needed to focus.

O'Leary tells Business Insider that Patterson said:

"Listen, Kevin. Every day, poo poo's gonna hit the fan. Stuff is gonna happen, and it's gonna be bad. You just don't know when or how bad it's gonna be. But you have to put shutters on, set a goal, don't listen to the noise, and just go forward. All of that noise is a distraction, and if you let it distract you, you'll fail."

Years later, in 1998, O'Leary was president of The Learning Company and moving forward with a hostile takeover of its rival software company, Broderbund. As he and his partners waited for approval of the $416 million deal from regulators and shareholders, O'Leary says that he found the New York Times and Wall Street Journal were critical of the deal and "digging up all the dirt" they could about him personally.

Patterson had died by then, but O'Leary says his former business partner's voice rang in his ears as critics questioned his acumen: "Listen. Don't crack. It's all noise."

The deal went through and O'Leary went to clear house at Broderbund, which came under his company's control. "I remember flying out west to the board and going in there after all those guys had been so difficult to work with and firing all of them," he says. "Not that revenge is sweet — it's just if you stay focused, you're a very powerful force."

That deal made The Learning Company attractive to Mattel, and the toy company bought it the next year for $4.2 billion at the height of the dot-com bubble. Mattel's timing was disastrous, but O'Leary left with a $5 million severance package by the end of the year.

Since then, O'Leary has built up several ventures, most recognizably as an investor on ABC's "Shark Tank." He has 21 companies in his portfolio now, and he says he's taught them all the lesson he learned from his late friend Gerry, which helped him both when he was just starting and when he was making one of the biggest deals of his life. He says:

Since then, I tell all the entrepreneurs I mentor that story and explain to them, "I swear to you it's going to be very hard. Business is hell on earth. But if you can stay focused and remember Gerry's words, you'll win. You'll beat those battles."

And it's these battles that make you want to be an entrepreneur, O'Leary says. "That's the whole reason you do it. You want to win."