In his decades of investing, CNBC's Jim Cramer hasn't just seen bear markets like the one that dragged stocks lower on Wednesday — he's also encountered a real bear. Once, when the former hedge fund manager was on a hike, a bear found its way to his tent. Instead of running, Cramer stood his ground and used what he had. He put some M&Ms in a can of Spam to bait the bear, then doused them in Tabasco sauce and ran. The distraction worked, and when the bear tasted the red-hot Tabasco, it ran off. "Now, I'm not saying you can outrun a bear. You can't. I'm not saying you should let him eat all your food and then hope he doesn't turn on you," Cramer said. "I am saying that you have to be clever. You have to think, 'OK, I'm not going to panic, I'm going to use my head and I'm going to outsmart the darned bear.'" The same principle can apply to the stock market, the "Mad Money" host said. Here are his three tips for investors to protect their portfolios from being mauled:

1. Focus on individual companies

The mere statement that a stock is "in bear market territory" doesn't actually affect the fundamentals of the underlying company, Cramer explained. "If you examine individual companies and think about what represents value, you can do better than you think," he said, calling attention to the stock of Home Depot, which managed to recover during Wednesday's trading session. Shares of Home Depot plunged Tuesday after the company's third-quarter earnings report. Investors, concerned about how the home improvement retailer would fare amid rising interest rates, sold the stock close to its year-to-date lows. "Today, ... shareholders outran the bear and Home Depot's stock went higher. Did the fortunes of the company change in 24 hours? Not at all," Cramer said. "So, first, recognize that even in a bear market, [you] can trick the ursine attacker by picking up stock in great American companies with fabulous balance sheets that will do well if the Fed decides to take a break from tightening."

2. Find the collateral damage

The bears have a "two-pronged fork" that can decimate stock gains, Cramer said. One prong is President Donald Trump's tariffs, which are set to rise to 25 percent at the end of 2018, and the other represents the Fed's rate hikes, which aim to slow economic activity and taper inflation. "You need to use the vicious selling to look for stocks that are being slammed even though they're not actually getting stuck by either prong of the fork," the "Mad Money" host advised. And even though market commentators might say "there's no hiding" in stocks during a bear market, 10 out of the 11 bear markets Cramer has witnessed proved to be great places for investors to hide, he said. The only exception was the 2007-2009 financial crisis, which was too risky to endure.

3. Buy accidental high-yielders

Third, Cramer recommended finding stocks with "accidentally high" dividend yields. These accidental high-yielders emerge when the stocks of high-quality companies with good balance sheets fall so low that their dividend-yield percentage grows dramatically. "You're going to feel very good about yourself when the negative fog lifts and those stocks bounce right back," he said.

Final thoughts

Keep Cramer's mantras in mind — there's always a bull market somewhere, nobody ever made a dime panicking — as you seek out opportunities in bear market territory. "Don't panic. Don't get scared. Don't stop looking for opportunity," Cramer said. "This is a man-made bear market where we're being torn to pieces by two grizzlies, President Trump and [Fed] Chairman [Jerome] Powell, who don't seem to care at all about the damage they're doing to your nest egg. But there are still opportunities out there if you stay calm and you know where to look."

WATCH: Cramer on navigating bear markets