The exact "antidote" would be to short-sell exactly the same number of shares you (indirectly) own through the fund, but don't want to hold. By doing so, you get the money back in your pocket, and if you both sell the index fund and the buy to cover the short at the same time/price, the performance of the combination would be the same as an index that excluded that shorted stock(s).
There are problems with this in practice, though:
1) your index fund position almost certainly contains a fractional number of shares, and it can change if the index changes composition. So you can at best approximate shorting the correct number at the correct time.
2) You're going to take a loss on the extra trading commissions, bid/ask spread, etc.
3) Naked short selling is quite restricted, and only possible very short-term (since the buyer does expect you to deliver the stock!). To hold this position for any length of time, you're going to have to arrange someone willing to loan you the shares, who will want to be paid (over and above the actual trade commissions) for doing so. You could also be forced to close the short position at any time if the lender demands these shares back.
4) To retain the pure "antidote" behavior, covering the short position has to be simultaneous with selling your index shares (to close the corresponding long position). Both have tax consequences, of course. If you just cover the short without selling the index, you'll instead realize whatever gain/loss has occurred on the short up to that point, and be back to owning the company as if you just bought it.
5) You also take on liquidity risk of not being able to buy/sell simultaneously with the index.