If you invest money in the stock market, you'll eventually encounter a bear market. There's no way around it. Bear markets test your emotional strength in a way that's hard to explain unless you've lived through one.

However, there's a way to soften the hit. Instead of focusing on stock prices, focus on dividends. Here's how Procter & Gamble (PG -0.03%), Kellogg (K -0.51%), and Hormel (HRL -0.93%) have helped me manage my emotions in turbulent times.

A terrible year

As far as stock prices go, 2022 was awful, with the S&P 500 Index down by roughly 20%. I noticed the drop, of course, but I wasn't phased by it. In fact, I saw it as a way to grow my portfolio at a faster clip, thanks to dividend reinvestment.

Indeed, my dividend-investing focus completely changes the way I look at market gyrations, making the inevitable bear markets way easier to handle from an emotional point of view. Some examples will help.

For starters, I like to buy longtime dividend payers when their yields are historically high. Essentially, that means buying companies with long histories of success behind them when they're out of favor.

For example, I purchased consumer-staples giant Procter & Gamble around the time it was jettisoning brands from its portfolio so it could focus on its most profitable ones. The yield at that point was near historic highs and close to 4%.

I felt comfortable jumping in despite the fact that Wall Street was so negative, because P&G has increased its dividend annually for decades. In fact, it's a Dividend King with over 60 years of annual hikes.

You don't build a streak like that by accident, and it proves that Procter & Gamble can handle adversity, even if short-term results are tough to look at for a bit. The stock has rallied strongly since those dark days, and the dividend yield is now down to around 2.4%. That said, during 2020, the stock was off by more than 20%, at one point.

I didn't pay any attention because I was focused on the still-generous dividend stream I was collecting. And the price decline? Well, that just meant I was able to buy more shares of a great company when I reinvested the dividends. Buying more shares, meanwhile, means that my dividend stream increases at a faster clip since the next dividend payment I collect will be from a larger share base. 

Dividends help me sleep at night

A more recent example of my approach is Kellogg, which was deeply out of favor through 2020 and 2021. There were good reasons for this, including a strike at the company's U.S. cereal-production plants. But the company had a yield over 4% and a long history of growing its dividend over time, so I stepped in during the darkest days.

Management's efforts to right the ship started to show through in 2022, and the stock was up over 10%. To be fair, Kellogg is a complex story today as it plans to break itself up into three parts. 

However, here's the real story: I didn't know the stock was up 10% until I wrote the line above. I never even looked because I was watching the dividends roll in all year long. Way more important to me was the fact that the board of directors increased the dividend in the second quarter of 2021 and the third quarter of 2022.

Those increases tell me that management still thinks the future of the company is on solid ground. When Wall Street sentiment turned broadly negative, as seen in the steep S&P 500 decline, it had little impact on me.

With a dividend yield of around 3.3%, Kellogg isn't as attractive as it was. But for investors willing to take on the uncertainty of a corporate breakup, that yield is still toward the high side of the company's historical-yield range.

That said, a more attractive option might be Hormel. The company is a Dividend King with over 50 years of annual dividend hikes. It owns iconic brands, like SPAM and Planters, and has been working to grow its domestic, international, and foodservice businesses via acquisition and innovation.

The stock fell nearly 7% in 2022, but again, I wasn't watching that. I was looking for the dividend increase, which occurred in the first quarter of that year. Although Hormel's 2.4% yield seems low on an absolute basis, it's historically high. 

And notably, the company announced another hike, set for the first quarter of 2022, in November. The increase will be a generous 6%. This will allow me to buy even more Hormel shares while they are still on the outs with investors. 

Buy income streams and sleep well

At its core, a stock is an ownership stake in the future cash flow of a company. Dividends are a tangible return on that stake. If you focus on buying companies that place a high value on rewarding investors with dividends, you can create a portfolio that will help you avoid the tension of bear markets.

Indeed, focusing on the dividends I'm collecting from Procter & Gamble, Kellogg, and Hormel has allowed me to pretty much ignore the market's gyrations. Procter & Gamble is the kind of company you want on your wishlist in case there's a deep drawdown. Meanwhile, Kellogg (for more aggressive types, given its pending business breakup) and Hormel look fairly attractive right now.