Be genuine when you congratulate someone on their joy or achievements. Never do something half-heartedly. The sound of “one hand clapping” will reveal your true feelings, regardless of how hard you try to mask it. Your actions will lead to embarrassment for yourself and you might regret your actions once it is too late.
Be true to yourself, be kind to others and karma will take care of the rest.