Bhagavad Gita 6.18

यदा विनियतं चित्तमात्मन्येवावतिष्ठते।निःस्पृहः सर्वकामेभ्यो युक्त इत्युच्यते तदा ॥६.१८॥

yadā viniyataṃ cittamātmanyevāvatiṣṭhateniḥspṛhaḥ sarvakāmebhyo yukta ityucyate tadā

When the perfectly controlled mind rests in the Self alone, free from longing for any of the objects of desire, then it is said, 'He is united'.

गीता