Continuing its heavy selling spree for the eighth consecutive month, foreign investors pulled out nearly Rs 40,000 crore from the Indian equity market in May on fears of an aggressive rate hike by the US Federal Reserve that dented investor sentiments.