^DJI Chart

The past three months' returns on the Dow -- scary! ^DJI data by YCharts.

OMG!

Oh, spit!

The sky is falling!

Stop. To borrow a line from the 1989 rom-com Say Anything: "You must chill. You must chill."

Yes, I realize that the market's imploding. I get it. Over the past six weeks, the Dow Jones Industrial Average (DJINDICES:^DJI) has lost more than 10% of its value. After the quick thrill of a 4% one-day rise last week, the Dow plunged a heart-stopping 3% on Tuesday -- and we're down again today.

With the market up one day and down the next, the net effect is a lot of pain for a lot of investors -- and I feel that pain personally. Today, my shares of Baidu are worth 30% less than what they sold for just three months ago. Collectively, we investors have seen nearly a year's worth of stock market gains wiped out in a matter of weeks.

^DJI Chart

^DJI data by YCharts.

Scary.

And yet, you're reading this, which means I'm still writing. I haven't jumped out any windows (not that it would help; I'm on the ground floor). Panic-selling when your stocks plummet won't slow their fall, and it won't salvage your portfolio -- it'll just lock in your losses.

What not to do
In fact, selling out of fear could cost you years of potential profits. Last year, JPMorgan published a study showing that an investor invested in a broad market index fund between Dec. 31, 1993 and Dec. 31, 2013 would have averaged 9.2% annual returns. But if that same investor had missed the 20 most profitable days in that 20-year span -- just one day per year -- then those returns would have been reduced to just 3% per year, barely keeping pace with inflation.

Stay out of the market a bit longer -- 30 days in 20 years -- and your profits fall to 0.9% annualized (at which point you're better off putting your money in a bank). And missing the 40 best days would yield losses.

That's 20 straight years of losing money.

Well, what should we do?
Instead of panicking and selling out, here's a better suggestion: Keep on doing what you've been doing. As an individual investor, you're powerless to influence the movement of the entire U.S. stock market, much less stock markets on the other side of the world. But you can influence how you react to these movements in the markets.

So what should you do? Keep working and keep depositing your paychecks. Keep researching high-quality, low-priced stocks. Don't get overexcited by soaring stock markets or panic when the Dow declines. But do keep on buying shares when you find them priced with a significant margin of safety. And most importantly, never buy more of any given stock than you can afford to lose -- because, despite our best efforts, we all make mistakes from time to time.

Once you've got that down, though, it's time to get greedy.

Greed is good
Is the sky really falling? A lot of investors seem to think so. Even the pros are panicking. The hedge-fund types are worrying about making their quarterly numbers and adding to their short positions in a frantic attempt to stanch the bleeding.

But on the off chance the sky doesn't fall and the world returns to normal someday, you should be preparing to profit from the tumult. Consult your stock "wish list" -- you've drawn one up, right? See whether panic selling has pushed any of your favorite stocks down below your hoped-for buy-in price.

Over in China, the source of our current problems, there are already twice as many Internet users as there are in the U.S., and half of China's population has yet to go online. And yet the shares of its premier search engine, Baidu, are nearly 40% cheaper than they were at the beginning of the year. Here at home, right this moment, shares of Bank of America are selling for less than 17 times trailing earnings. According to S&P Capital IQ, that's 15% below their average P/E ratio for the past five years -- at a time when the Fed is planning an interest rate hike that will boost Bank of America's profits.

In short, the market sell-off seems to be offering surprising opportunities for opportunistic investors -- and today just might be your lucky day.

It's been a while, but the sky has fallen before, Fools -- and more than once. Previous versions of this article ran on Fool.com in 2007, 2008, 2010, and 2011.

Market turmoil notwithstanding, Fool contributor Rich Smith owns shares of Baidu -- but per The Motley Fool's gold-plated disclosure policy, he cannot buy more until three days after this article has run. You can find him on Motley Fool CAPS, publicly pontificating under the handle TMFDitty, where he's currently ranked No. 260 out of more than 75,000 rated members.

The Motley Fool owns and recommends Baidu. The Motley Fool recommends Bank of America. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.