I can't count how many times I've heard some version of the line, "Facebook's IPO was the worst of all time" in the months since it went public.

After all, Facebook (Nasdaq: FB) shares are down more than 50% since hitting the market in May. Andrew Ross Sorkin of The New York Times put the drop into context last week. "Facebook's market value has dropped more than $50 billion in 90 days," he wrote. "To put that in perspective, that's more market value than Lehman Brothers gave up in the entire year before it filed for bankruptcy."

But that's not why I consider its IPO a failure. My issue can be summed up with two news headlines.

This one, from three days before the IPO: "Facebook IPO has individual investors lining up."

And this one, from two weeks after the IPO: "Lawyers Line Up to Sue Facebook over IPO."

If there's a better two-line summary of why so many people fail at investing, I can't think of it. Here was a sensationally hyped company trading at a mind-numbing 100 times earnings that investors around the world were tripping over themselves to get their hands on. And when shares didn't make them a fortune in the first 90 days, they concluded that the whole game is rigged, stomped their feet, and sued everyone in sight.

Facebook's IPO was the worst of all time because it was a perfect display of the short-term-minded, oblivious-to-risk, valuation-be-damned culture that has overtaken public markets.

All kinds of blame has been thrown about for this debacle, including allegations that Wall Street tipped off select clients. But no one forced anyone to buy overpriced, overhyped IPO shares to begin with. No one forced you to pay 100 times earnings for a company that had just disclosed that its growth was slowing.

If you bought Facebook shares, you (or your advisor) did so on your own terms.

If there's one investment line you should never forget, it's that you are your own worst enemy. Benjamin Graham, Warren Buffett's early mentor, used to say that "Mr. Market is there to serve you, not to guide you." It's a simple yet powerful statement. All it means is that the market occasionally delivers wild and irrational opportunities. To be a successful investor, you have to be able to choose how to react to those events. If stocks are expensive and the public is going gaga for something, it's usually wise to stay away. History teaches this over and over again. When people panic and valuations plunge, that's when you want to be ready to buy. This also repeats itself again and again in history.

When people lose money on a company like Facebook, it doesn't mean the market is rigged, broken, or unfair. It means they forgot or ignored Graham's simple lesson about how to deal with Mr. Market. Every debate about the causes of Facebook's 50% decline can be appropriately summed like this: A bunch of investors let their emotions get the best of them and overpaid for a stock. It happens.

This goes well beyond Facebook. After the S&P 500 (INDEX: ^GSPC) had a miserable decade of low returns, we've heard countless stories from investors fed up with the market in general. There's little evidence that people are actually fleeing, but we know that tensions are high and confidence is shot. One recent poll of those with more than $100,000 to invest showed that one-third have become less confident in stocks over the last year.

But we also know that the biggest reason individual investors have performed poorly in recent years is that so many of them began investing during the dot-com bubble a decade ago and either sold or did nothing when stocks plunged in 2009. Just like Facebook investors, they have become their own worst enemy, buying during bubbles, selling during panics -- and then concluding that the market doesn't work anymore.

Adjusted for dividends, the market is at a new all-time high. The period from 2009 to 2012 was one of the best three-year intervals in the history of the stock market. S&P 500 dividend payments are at record highs. Buying good companies at good prices and holding them for a long time works as well today as it ever has. Buying overhyped companies at 100 times earnings and counting on them to rise over a 90-day period doesn't work. But it has never worked before -- and it never will.