Horrific. Terrible. Abysmal. The worst. Those are terms equity analysts are using to describe investors’ attitude toward energy stocks.

Shares of exploration-and-production companies, along with oil-field-service firms, have fallen even more than crude prices this year. A five-year slump in oil prices as well as even longer bouts of rock-bottom natural-gas sales and profligate spending has caused investors to sour on the sector.

While...