As the S&P 500 slips further into bear market territory, falling more than 24% since its peak in January, many investors are worried about what that means for their investments.

The unfortunate reality about bear markets is that nobody knows for certain how long they'll last or how severe they may be. That said, there are still a few things you can do right now to keep your money as safe as possible.

1. Try to avoid emotion-fueled decisions

When stock prices are falling, many investors' gut instinct is to pull all their money out of the market. While this may feel like the right decision in the moment, it can be a costly move.

Many stocks have watched their prices plummet over the past few months. That means if you sell your investments now, you'll likely end up selling for less than you paid for them, potentially locking in steep losses.

Although it's easier said than done, one of the best moves you can make right now is to keep your money in the market. Eventually, stock prices will recover. When that happens, your investments should bounce back, and you won't have lost anything.

2. Keep a long-term outlook

Again, nobody knows exactly how long this market slump will last. But historically, the market has an impeccable track record when it comes to recovering from bear markets.

In fact, since 1928, the S&P 500 has experienced 21 separate bear markets (not including the current downturn). That means, on average, it has fallen by at least 20% every 4.5 years. Yet it has managed to recover from every single one of those slumps.

Chart showing overall upward trend in the S&P 500 since 1990, with recent fall.

^SPX data by YCharts

In the short term, the market can be volatile. But over the long run, it's consistently seen positive average returns. While it's not always easy, try your best to keep a long-term outlook during periods of volatility. Things may be rough now, but they will get better.

3. Continue investing (with two important caveats)

Bear markets are stressful and nerve-wracking for most investors. But the silver lining is that they can also be fantastic buying opportunities, and you could potentially save a lot of money.

Stock prices are lower than they've been in months, which means now is your chance to load up on high-quality stocks at a steep discount. If there are particular companies you've had your eye on, it's a smart time to buy while the stock market is essentially on sale.

There are a couple of caveats to consider, though. For one, make sure you're investing in the right stocks. Just because a stock is more affordable right now doesn't necessarily mean it's a smart buy, so be sure you're doing your research before you invest.

When in doubt, a safe option is to invest in an S&P 500 index fund or exchange-traded fund (ETF), such as the Vanguard S&P 500 ETF (VOO 0.96%) or iShares Core S&P 500 ETF (IVV 0.97%). These funds track the S&P 500, which means it's extremely likely they will recover from this downturn.

The other caveat is to double-check your emergency savings. It's best to avoid investing any money you may need in the next several years, so if you're strapped for cash or don't have a healthy emergency fund, it may be wise to focus on those priorities before investing.

It's normal to feel nervous about investing during a downturn, but even the worst bear markets are only temporary. By maintaining a long-term outlook and taking advantage of this buying opportunity (if you can swing it), your investments can come out the other side of this downturn stronger than ever.