Bhagavad Gita · 2.49
दूरेण ह्यवरं कर्म बुद्धियोगाद्धनञ्जय।बुद्धौ शरणमन्विच्छ कृपणाः फलहेतवः॥
dūreṇa hy avaraṁ karma buddhi-yogād dhanañjaya buddhau śharaṇam anvichchha kṛipaṇāḥ phala-hetavaḥ
Action performed with selfish motives is far inferior to action performed with equanimity of mind, O Dhananjaya. Seek refuge in this equanimity. Wretched are those motivated by the fruits of action.
— Bhagavad Gita 2.49
Source: Sacred-Texts.com (Sanskrit) + Bhagavad-Gita.io (translations)