rir para não chorar

Etymology
lit. 'to laugh so that [one] doesn’t cry'.

Verb

 * 1)  to face a situation so tragic that one cannot help but laugh at their own misery