The share-price boom at U.S. energy firms has gone bust, due to slumping global growth and tumbling crude prices. Companies that drill for oil and natural gas and provide services at the wells were among the most popular investor bets earlier this year, riding the coattails of a decadelong renaissance in U.S. oil and natural-gas production.