Having made pleasure and pain, gain and loss, victory and defeat the same, engage yourself in battle for the sake of battle; thus you shall not incur sin.
—Bhagavad Gita 2.38
Pleasure and pain are not real. These are just notions of the mind. Without this realization the mind is always busy running after something that it thinks would be pleasurable or running away from things it finds painful. With the mind running here and there we won’t be able to perform any meaningful work. Besides, our understanding gets clouded, we lose our priorities and all immoral acts proceed from the ignorance of the fact that pleasure and pain exist only in the mind, not in the thing outside.
So when you rise above pleasure and pain, you won’t do anything inappropriate or sinful. There is no question of acting out of selfishness. No harming someone else just for the sake of gaining pleasure or losing pain because you know pleasure and pain don’t exist outside. When selfishness gets out of the way, all work you do would be for the greater good of the world. And the mind remains calm, there is no pleasure to run after, there is no pain to run away from, the mind is always focused on the work on hand. A calm and focused mind just does what needs to be done irrespective of chances of success or failure. Such a mind that works for work’s sake always turns out high quality work.
But can this level-headed-ness in success and failure be practical? Well, we should just try as much as we can, try for trial’s sake! If you want a practical example you should get to know MS Dhoni, who has this ‘ability to remain level-headed, at the height of success or depths of failure’. MSD is the current captain of the Indian cricket team and one of the most successful captains in Indian cricket.