What looks like bad news can sometimes be a good thing for investors. History has shown us that many companies bounce back from lousy luck, delivering solid profits for those who had the courage to invest during troubled times.

Take Toyota (NYSE:TM), for example. A massive recall of its most popular models has left a nasty dent in its share price, reputation, and bottom line. But while the company is hurting from its problems with faulty gas pedals, the stricter safety procedures that will likely result from its troubles could leave the company -- and its customers -- better off.

Yet many investors don't seem to share that view, wondering instead whether the company's glory days are behind it. Their lack of confidence may explain why Toyota's shares have fallen more than 10% since early last week.

Carpe diem
Frankly, the incident reminds me of Johnson & Johnson (NYSE:JNJ) and the famous 1980s Tylenol-tampering scandal. In late 1982, seven people died from cyanide poisoning after taking tainted Tylenol. The stock lost 20% of its value in just a month, as investors lost confidence when they saw the company recall and remove the product from shelves, and face losing millions of dollars.

But by November, the stock had exceeded its September high. And more importantly, by acting swiftly and quickly, the company regained investors' confidence as it put the safety of the public first.

When calamity strikes a company, it can provide investors with a great opportunity. Our recent financial meltdown sent stocks like Wells Fargo (NYSE:WFC) and JPMorgan Chase (NYSE:JPM) plunging, only to subsequently recover. And while many people wrote off the U.S. auto industry recently, Ford (NYSE:F) stock is now up more than 10 times from where it traded in late 2008.

Sometimes, a calamity or bad news isn't necessary; a simple loss of confidence is enough to seriously depress a stock. That's when you have to ask yourself whether you believe that the company's troubles represent an opportunity or a trap.

If you think that Toyota has the wherewithal to get its act together again, you might be looking at an attractive buying opportunity. But you should always be extra-diligent and cautious in your research with beaten-down stocks. Many stay down -- and some end up going out of business.

Have you ever invested in a beaten-down company? Tell us about how you fared -- leave a comment below!

Longtime Fool contributor Selena Maranjian owns shares of Johnson & Johnson. Ford Motor is a Motley Fool Stock Advisor pick. Johnson & Johnson is a Motley Fool Income Investor recommendation. Try any of our investing newsletter services free for 30 days. The Motley Fool is Fools writing for Fools.