How to control your mind?

In all spiritual affairs, one's first duty is to control his mind and senses. Unless one controls his mind and senses, one cannot make any advancement in spiritual life. Everyone within this material world is engrossed in the modes of passion and ignorance. One must promote himself to the platform of goodness (sattva-guna).

vāco vegam' manasaḥ krodhavegam'
jihvāvegamudaropasthavegam
etān vegān yo viṣaheta dhīraḥ
sarvāmapīmām' pṛthivīm' sa śiṣyāt

vāco – of speech
vegam' – urge
manasaḥ – of the mind
krodha – of anger
vegam' - urge
jihvā – of the tongue
vegam – urge
udaro-pastha – of the belly and genitals
vegam' - urge
etān – these
vegān – urge
yo – whoever
viṣaheta – can tolerate
dhīraḥ - sober
sarvām - all
apī – certainty
mām' – this
pṛthivīm' – world
sa – that person
śiṣyāt – can make disciples

MEANING:
A sober person who can tolerate the urge to speak, the mind's demands, the actions of anger and the urges of the tongue, belly and genitals is qualified to make disciples all over the world.

Real atonement involves coming to real knowledge, and for this there is a standard process. When one follows a regulated hygienic process, he does not fall sick. A human being is meant to be trained according to certain principles to revive his original knowledge. Such a methodical life is described as tapasya. One can be gradually elevated to the standard of real knowledge.