In the midst of the COVID-19 pandemic, many investors have watched their 401(k) balances plummet. These are uncertain times for workers -- especially those who are nearing retirement age -- and it's normal to feel a little panicked. However, there are a few things you should be doing instead to salvage your savings and make the best of the situation.

1. Build a solid emergency fund

When your 401(k) balance begins to crumble, it's a good idea to have some cash set aside that you know you'll be able to rely on if times get tough. If you can, try to cut back on your spending and divert some cash to a high-yield savings account. These types of accounts are an ideal place to park your savings -- they offer much higher interest rates than standard bank savings accounts, but your money is also protected from market downturns.

Couple working with a financial advisor and looking at a laptop

Image source: Getty Images

Ideally, your emergency fund should have enough cash to cover around three to six months' worth of general living expenses. But for right now, it's a good idea to simply save whatever you can -- since some money in savings is better than nothing.

2. Continue contributing to your 401(k)

It may seem counterintuitive, but it's still important to contribute to your retirement fund even when the stock market drops. The good news is that the stock market will bounce back. It may take time, but eventually this uncertain period will pass, and you'll see your investments improve once again.

If you stop contributing to your 401(k) now, you're missing out on valuable time to let your investments grow. It's especially important to keep saving if your employer offers matching 401(k) contributions, because those contributions are essentially free money. At the very least, try to save enough to earn the full match so you can take full advantage of that extra cash from your employer.

3. Don't cash out your 401(k)

If you're worried about losing money in the stock market, it's tempting to want to pull all your cash out of your 401(k) now. However, even when the market dips, you haven't actually lost any money until you sell your investments. By leaving your money alone, you can ride out the storm and let your investments bounce back all on their own.

Additionally, cashing out your 401(k) before age 59-1/2 could lead to big financial consequences, including a 10% penalty fee and income taxes on the amount you withdraw. By keeping your cash where it is, you could end up saving a lot of money over the long run.

4. Double-check your asset allocation

This stock market rollercoaster can be more intimidating if you're closer to retirement age, so now is a good time to make sure your asset allocation matches your long-term goals. The older you get, the more your portfolio should lean toward more conservative options like bonds over riskier investments like stocks. That's because even during strong economic times, the stock market experiences lots of short-term ups and downs that can affect your savings -- which can be dangerous when you're relying on that money to survive.

Exactly how much you should rely on stocks versus bonds will depend on several factors, such as your age, when you plan to retire, and your tolerance for risk. But now is a prime time to think about whether you're over-relying on stocks and should shift your portfolio toward more conservative investments.

If you're concerned about how your 401(k) will pull through these concerning times, you're not alone. But do your best to avoid panicking, and instead take advantage of these strategies to set your retirement fund up for success.