If you know that you will not be able to attend someone's "simcha" (wedding, bar-mitzvah, etc.), it is frequently preferable to wish a "mazel tov" beforehand rather than after. Otherwise the person might be more disappointed when you do not attend.

Although you might be able to correct matters for the future, you will not be able to rectify his hurt feelings in the past.