While explaining discrimination between discharging one's duty and abandoning it, He said, "There is nothing more welcome for a man of the warrior class, than a righteous war, which is an open gateway to heaven; if you do not wage it, you will incur sin. But if you fight treating pleasure and pain, gain and loss, victory and defeat, alike, you will not incur sin. Your right is to perform your duty, but never to its fruit. Let not the fruit of action, be your object, nor let your attachment be, to inaction. Therefore,- perform your duty being fixed in Yoga, because equanimity consists in remaining even-minded, in success and failure. A man who, endowed with equanimity performs his duty, becomes free from virtues and vices in his lifetime. When your intellect transcends the mire of delusion, and the confusion by hearing conflicting statements, it becomes poised and firmly fixed, in meditation (on God), you will attain union with God."
Appendix:-The striver devoid of the sense of mine and egoism gets dissociated from the material world called as 'Asat division' and realizes his natural owner abidance in Brahma i.e., Sat division. This abidance is known as 'Brahmi sthiti'. Having attained this state no owner of this body remains, in other words there is none who assumes this body as 'I' or 'mine' and individuality is wiped out. It means that our reality is not dependent on egoism. Even rid of egoism ever Reality stands which is called 'Brahmi sthiti' or 'abidance in Brahma'. Once this 'Brahmi sthiti' (eternal union) is realized, then a man never gets deluded (Gita 4/35). If even at the time of death, being free from the sense of mine and egoism, he realizes this `Brahmi sthiti' (state of Godhood), he attains brahmic bliss (identification with the absolute state) immediately.
By being free from the sense of mine and egoism, Brahma (the Absolute) or enlightenment is attained. Then a man becomes free from the sense of mine, from desire and from doership. The reason is that the embodied soul has sustained the universe because of egoism—`ahankaravimadhatma kartahamiti manyate' (Gita 3/27), 'Jivabhutam mahabaho yayedam dharyate jagat' (Gita 7/5). If he renounces egoism, the universe will not exist any more. Having attained the Absolute (if he has the latencies or impressions of devotion), he will know God in - entirety naturally because the universal soul is the support of Brahma.