卧薪尝胆

undergo self-imposed hardships so as to strengthen one's resolve to do sth.

wò xīn cháng dǎn ㄨㄛˋ ㄒㄧㄣ ㄔㄤˊ ㄉㄢˇ