Language:
Free Online Dictionary|3Dict

暗自庆幸

Source : CEDICT

to congratulate oneself/to consider oneself lucky (idiom)