How to overcome desire ?

This subject is dealt with in Bhagavad-Gita, Chapter II.

The modern psychologists quote these verses often to describe the relationship between desire and mind.

dhyaayato vishayaan pumsah, sangas teshoopajaayate
sangaat sanjayate kaamah, kaamaat krodho 'bhijaayate ||2- 62 ||

One develops attachment to sense objects by thinking about sense objects. Desire for sense objects
comes from attachment to sense objects, and anger comes from unfulfilled desires. (62)

krodhaad bhavati sammohah, sammohaat smriti-vibhramah
smriti-bhramshaad buddhi-naasho, buddhi-naashaat pranashyati ||2- 63 ||

Delusion arises from anger. The mind is bewildered by delusion. Reasoning is destroyed when the mind
is bewildered. One falls down (from the right path) when reasoning is destroyed. (63)

"Thinking constantly on the objects of senses, a man develops
attachment for them; from the attachment springs desire, and from desire
(obstruction in fulfillment) ensues anger. From anger arises delusion
(foolishness); from delusion, confusion of memory; which results in loss of
reasoning/discrimination (Viveka), and with loss of reasoning/discrimination, he
goes to complete ruin."

raga-dvesa-vimuktais tu, visayan indriyais caran
atma-vasyair vidheyatma raga-dvesa-vimuktais tu ||2- 64 ||

A disciplined person, enjoying sense objects with senses that are under control and free from
likes and dislikes, attains tranquility. (64)

prasade sarva-duhkhanam, hanir asyopajayate
prasanna-cetaso hy asu, buddhih paryavatisthate || 2-65 ||

All sorrows are destroyed upon attainment of tranquility. The intellect of such a tranquil
person soon becomes completely steady. (65)

"But a self-controlled Yogi (karma yogi) in practice or a spiritual aspirant,
while using objects with the senses, which are controlled and freed from
attraction and aversion (Raga-Dwesha), he attains the tranquility (purity) of
mind. With the attainment of such tranquility (purity), all his sorrows come to
an end; and the intellect of such a person of tranquil (pure) mind, very soon
without any doubts becomes, firmly established in Paramatma (God)".

Sri Krishna concludes this Chapter with the following words:
One attains peace in whose mind all desires enter without creating any disturbance,
as river waters enter the full ocean without creating a disturbance. One who desires
material objects is never peaceful. (2.70)
One who abandons all desires and becomes free from longing and the feeling of 'I' and
'my' attains peace. (2.71)