I’ve been investing in stocks through mutual funds for more than 30 years. I’ve known all along that periodic swoons come with the territory. I’ve experienced the October 1987 crash, the 2000–2002 bursting of the tech-stock bubble, and the kerflop of stocks accompanying the 2007–2009 credit crisis and “Great Recession.”

Even so, it’s never easy to see a fall in stocks slice into one’s retirement portfolio. But if getting older has an upside, it’s that experience has taught me some coping mechanisms.

The first is to keep some perspective and humility. During dives like the 1987 crash or the much smaller drops in stocks that we’ve seen in the past couple of weeks, it’s easy to think “everyone” is selling. But the truth is that every share of stock that’s sold—whether by an individual or by a mutual fund—is purchased by some other individual or institution. If I’m selling, someone else is buying. Do I have any reason to believe I’m smarter than whoever is on the other side of the transaction? (This question, by the way, also helps me avoid overweighting stocks when the market is giddy.)

During dramatic market moves, you’ll see or hear pundits offering their opinions on what to do. I still agree with Vanguard founder Jack Bogle’s advice about what to do during market booms or busts: “Don’t just do something, stand there!” In investing, emotions really are your enemy.

Another coping mechanism is to ask the pundits some version of a question my son once asked me: “Dad, if you know so much about investing, why aren’t we rich?” If anyone were able to consistently predict the markets and adroitly move into and out of the stock market, it wouldn’t take long for that genius to become one of the world’s wealthiest individuals. But who is actually near the top of such lists? Warren Buffett, who is known for being a long-term investor in companies and their stocks.

But the most important coping mechanism for me—and I think for most investors—is simply making sure to keep a balanced portfolio. When stocks are performing well, it’s tempting to overweight your portfolio with them. During those times, I try to remember Mr. Buffett’s advice about stock market declines being normal, if not predictable.

“They are not an abnormal phenomenon, he wrote. “Just like the changing seasons, if you know winter is inevitable then you will be prepared for it.”

I also try to remember a comment Peter Bernstein, author of several terrific investment books, made in an interview for our “In The Vanguard” newsletter: “Owning bonds gives you the courage to own stocks.”

The wisdom of Mr. Bernstein isn’t obvious when stocks are rising. But when stocks tumble, the bonds in your portfolio serve two important purposes. First, bonds can cushion the blow, since their prices usually don’t follow the stock market downward. Second, your bond funds give you the wherewithal to rebalance into stocks.

And, hard as it is to do when you know stock prices can fall further, that’s just what I’ve done in the past couple of days. I have no expectation that I’ve aptly timed the market, but rebalancing your portfolio is about sticking with a plan—not about trying to beat the markets.

Note: All investments are subject to risk. Investments in bond funds are subject to interest rate, credit, and inflation risk. Diversification does not ensure a profit or protect against a loss in a declining market.