Theoretically, it's "complicated". Build a spreadsheet of all the index constituents, their expected payouts, associated dates, and real-time stock prices, and index weights. Then hours of struggle later, cross your fingers, and hope you haven't made any calculation mistakes ;-)
The quick and easy way... simplify your equations with r=0 and replace the spot price of the index with the forward index value from the futures market. In effect, you're using an ATMF versus an ATM framework. This will have the same expiry as the options, plus embed both the interest rate and expected dividend components.
The eagle-eyed observer might correctly observe monthly expiries on options versus only quarterly on futures. It's a fair point. However, it is trivial to interpolate ATMF from put-call parity on the Oct/Nov/Jan/Feb/Apr/May/Jul/Aug options.
Put simply, you can get the market to all the hard work for you here!
For options on single stocks rather than indices, the principle holds. Put-Call parity gives you a forward price of the same tenor as the associated options. For a stock worth 100, if the market is pricing in a dividend payment of 1 and you are sure it will be say 1.1, then reprice your calls/puts for a future worth 0.1 more than currently priced.
Finance 101, under no-arbitrage conditions:
Forward = Strike + Call - Put
Forward + Cash = Spot + Dividend
Dividend = Strike + Call - Put + Cash - Spot
[True pedants might quibble about the time value of a future dividend surprise. However, compare a few weeks of interest on a dividend surprise (a few % of a few % of price) to the materiality of price and implied vol uncertainties; and life is just too short]