to harden one's heart; to force oneself to be strict or unfeeling in order to make a difficult but necessary decision.
親として心を鬼にして、子どものわがままを叱った。
As a parent, I steeled myself and scolded my child's selfish behavior.
会社の経営が苦しく、社長は心を鬼にして人員整理を行った。
The company was struggling, and the president hardened his heart and carried out layoffs.
ダイエット中は心を鬼にして甘い物を我慢している。
While dieting, I force myself to resist sweets.