For those who are not familiar with the ancient Indian text of Bhagavad Gita, it is one of the most popular philosophical conversations between Lord Krishna and the prince Arjuna, which is part of the great epic of the Mahabharata.
When the mind engages in selfish desires it evaluates success and failures and never gets the freedom. The mind needs diversion from selfish to unselfish desires to get the freedom.