You can just feel it, can't you? People are stone terrified about how the market has acted over the past month. Watch the news -- watch BubbleVision, if you dare. The "boo-yahs" on Mad Money seem more restrained. Jim Cramer acts grateful when they come at all.

The most painful flat market
The S&P 500 is now a little bit down for the year, but this fact misses something important: the tenor of how those results were achieved. The S&P quickly went up, but then it came barreling right back down.

For small-cap investors, the drop is even more severe -- in the space of a month, the Russell 2000 has dropped 15%. And if you want to see real pain, look at the people who piled into overseas markets and securities. The Bombay Stock Exchange is nearly 30% lower, and the Russian and Brazilian markets are more than 20% lower than they were a month ago. That's gut-wrenching, and people are wondering what to do. Suddenly, all of the things we ignored two months ago -- inflation, energy costs, the potential U.S. collapse in the World Cup -- are big, big problems. Gold and silver companies, too, have been taken out and shot.

Everyone is thinking this is a terrible time to be invested. But when everyone is thinking the same thing, no one is thinking much at all. That means ... opportunity.

Nauseating gains
Want to know when I like my stock purchases best? When I have a faint feeling that I'm going to throw up when I make them. Last year, Elan (NYSE:ELN) got shellacked when its lead drug, Tysabri, was pulled from the market following the revelation of two deaths by people who were on the drug. In the course of the month, the stock lost 90% of its value, and the heavy bet was on it losing 100%. Although the outcome has been very good for me, the fact of the matter is that those who thought Elan was doomed were not far from being right. But I thought that the fact that the deaths had occurred in combination with another drug was noteworthy and left a higher-than-accounted-for chance that the drug might come back.

Those are the moments when fortunes are made. You might not recognize it at the time. You might not know it for years. But it's true. When everyone is down on a stock, or a sector, or a country, you might as well take a look. Usually, the negativity comes with good reason. But the over-negativity can provide plenty of opportunity. It's been that way forever, and it will always be so. A small list of companies that have been despised by the market, only to rebound mightily, include Citigroup (NYSE:C), AMR (NYSE:AMR), Sepracor (NASDAQ:SEPR), and Apple Computer (NASDAQ:AAPL). Each of these companies went through turmoil, had periods of horrible news, and recovered. This has been my stock in trade for years. It's what I brought to our small-cap Motley Fool Hidden Gems service when I joined last year, having selected temporarily hated firms like Fairmont Hotels (since taken private at a 40% premium) and TransMontaigne (NYSE:TMG), also being bought out at a nice gain for subscribers.

The Foolish bottom line
I don't always get 'em right in Hidden Gems, and you won't always get 'em right when you invest. No one does. But the thing is, you don't have to be right every time if you're buying good or great companies when everybody hates them. The thing is, the stock market is mostly rational. Stuff's hated for a reason. But as we have seen time and time again, market sentiment goes too far in one direction or the other. I believe that there are plenty of places where the market has overreacted. They were excited, and now they're not. And that makes me excited.

But I might have to throw up first.

Bill Mann is co-advisor of Motley Fool Hidden Gems. Bill invites you to take a30-day all-access guest passto Hidden Gems, the Fool's market-beating small-cap newsletter service, with no obligation.

Bill owns shares of Elan, and he likes to do Sudoku puzzles in pen. The Fool's disclosure policy made him tell you this.