West Ham's bid to avoid relegation from the Premier League has suffered a blow after midfielder Gary O'Neil was ruled out for the rest of the season with an ankle injury.