First, avoid companies with too much debt. Second, focus on book value, not earnings. And third, buy stocks that are trading at new four or five year lows. If a stock meets all three criterions, it is a good buy.
Such stocks can survive shocks, even of a Great Depression.
If you want to learn more check out these resources: