One has to learn tolerance in the face of dualities such as happiness and distress, or cold and warmth and by tolerating such dualities become free from anxieties regarding gain and loss (Bhagavad-Gita (2.45), Purport)

O Arjuna, become transcendental to the three modes. Be free from all dualities and from all anxieties for gain and safety, and be established in the self. (Bhagavad-Gita(2.45)

By remembering the Lord in acute distress one can be free from all varieties of miseries and anxieties. (Bhagavad-Gita (1.7.10), Purport)