To express one’s sympathetic pleasure or joy to the person(s) it is felt for.
Remind me to congratulate Dave and Lisa on their wedding.
To consider oneself fortunate in some matter.
I congratulated myself on the success of my plan.