Bhagavad Gita

ಯಃ ಸರ್ವತ್ರಾನಭಿಸ್ನೇಹಸ್ತತ್ತತ್ ಪ್ರಾಪ್ಯ ಶುಭಾಶುಭಮ್ ।
ನಾಭಿನಂದತಿ ನ ದ್ವೇಷ್ಟಿ ತಸ್ಯ ಪ್ರಜ್ಞಾ ಪ್ರತಿಷ್ಠಿತಾ ॥೫೭॥
yaḥ sarvatrānabhisnehastattat prāpya śubhāśubham |
nābhinaṃdati na dveṣṭi tasya prajñā pratiṣṭhitā ||57||

Gist of the sloka:
If the person experiences happiness and grief, those do not get severely attached to the person. He would not get rejoice due to happiness and lament due to difficulty. For his awareness is strong.
Lord Krishna says, do not rejoice when happiness comes your way and do not fall into grief when the difficult situation arrives. Never have over-attachment to either of the situations. Keep your mind steady, for difficulty has not left anyone alone. With a steady mind, one can tolerate both the situations and progress towards Lord.
If we look at the history of the Pandavas, they have undergone various situations which are most difficult even though they were all avatars of demi-Gods. What else can be situations of common populace? Therefore, one should, keeping their mind steady and believing that they have overcome the duality of the situations, without demanding any particular state [knowing its beyond their ability and responsibility], would see their life would become steadier and leads to elevation of soul.
Gynani have this steady state. For an ordinary person controlling the senses is a difficult task initially but with regular practice one can achieve that, leading to progress.