Bhishma said, 'I shall now tell thee what the means are (for conquering the senses) as seen with the eye of the scriptures. A person, O king, will attain to the highest end by the help of such knowledge and by framing his conduct accordingly.
Amongst all living creatures man is said to be the foremost. Among men, those that are regenerate have been called the foremost; and amongst the regenerate, they that are conversant with the Vedas [scriptures]. These last are regarded as the souls of all living creatures. Indeed, those Brahmanas that are conversant with the Vedas are regarded as all-seeing and omniscient. They are persons who have become conversant with Brahma. As a blind man, without a guide, encounters many difficulties on a road, so has a person destitute of knowledge to encounter many obstacles in the world. For this reason, those that are possessed of knowledge are regarded as superior to the rest.
Those that are desirous of acquiring virtue practise diverse kinds of rites according to the dictates of the scriptures. They do not, however, succeed in attaining to Emancipation, all that they gain being those good qualities of which I shall presently speak. Purity of speech, of body, and of mind, forgiveness, truth, steadiness, and intelligence,--these good qualities are displayed by righteous persons observant of both kinds of religion. That which is called Brahmacharya [chastity] is regarded as the means of attaining to Brahma [God]. That is the foremost of all religions. It is by the practice of that religion that one obtains the highest end (viz., Emancipation). Brahmacharya is divested of all connection with the five vital breaths, mind, understanding, the five senses of perception, and the five senses of action. It is on that account free from all the perceptions that the senses give. It is heard only as a word, and its form, without being seen, can only be conceived. It is a state of existence depending only on the mind. It is free from all connection with the senses. That sinless state should be attained to by the understanding alone. He that practises it duly attains to Brahma; he that practises it half and half, attains to the condition of the gods; while he that practises it indifferently, takes birth among Brahmanas and possessed of learning attains to eminence.
Brahmacharya is exceedingly difficult to practise. Listen now to the means (by which one may practise it). That regenerate person who betakes himself to it should subdue the quality of lust as soon as it begins to manifest itself or as soon as it begins to be powerful. One that has betaken oneself to that vow should not speak with women. He should never cast his eyes on an undressed woman. The sight of women, under even indifferent circumstances, fills all weak-minded men with lust. If a person (while observing this vow) feels a desire for woman rising in his heart, he should (as an expiation) observe the vow called Krichcchra [fasting] and also pass three days in water [a sacred bath or mikveh]. If desire is entertained in course of a dream, one should, diving in water, mentally repeat for three times the three Riks by Aghamarshana [prayers; Christians can use The Lord's Prayer]. That wise man who has betaken himself to the practice of this vow should, with an extended and enlightened mind, burn the sins in his mind which are all due to the quality of lust.
As the duct that bears away the refuse of the body is very closely connected with the body, even so the embodied Soul is very closely connected with the body that confines it. The different kinds of juices, passing through the network of arteries, nourish men's wind and bile and phlegm, blood and skin and flesh, intestines and bones and marrow, and the whole body. Know that there are ten principal ducts. These assist the functions of the five senses. From those ten branch out thousands of other ducts that are minuter in form. Like rivers filling the ocean at the proper season, all these ducts, containing juices nourish the body. Leading to the heart there is a duct called Manovaha. It draws from every part of the human body the vital seed [semen] which is born of desire. Numerous other ducts branching out from that principal one extend into every part of the body and bearing the element of heat cause the sense of vision (and the rest). As the butter that lies within milk is churned up by churning rods, even so the desires that are generated in the mind (by the sight or thought of women) draw together the vital seed that lies within the body. In the midst of even our dreams, lust having birth in imagination assails the mind, with the result that the duct already named, viz., Manovaha, throws out the vital seed born of desire [resulting in wet dreams].
The great and divine Rishi Atri is well-conversant with the subject of the generation of the vital seed. The juices that are yielded by food, the duct called Manovaha, and the desire that is born of imagination,--these three are the causes that originate the vital seed which has Indra for its presiding deity. The lust that aids in the emission of this fluid is, therefore, called Indriya.
Those persons who know that the course of vital seed is the cause of (that sinful state of things called) intermixture of castes, are men of restrained lust. Their sins are regarded to have been burnt off, and they are never subjected to rebirth.
He that betakes himself to action simply for the purposes of sustaining his body, reducing with the aid of the mind the (three) attributes (of Goodness, Passion, and Darkness, the Gunas) into a state of uniformity, and brings at his last moments the vital breaths to the duct called Manovaha, escapes the obligation of rebirth.
The mind is sure to gain knowledge [Gnosis, Daath]. It is the mind that takes the form of all things. The minds of all high-souled persons, attaining to success through meditation, become freed from desire, eternal, and luminous. Therefore, for destroying the mind (as mind), one should do only sinless deeds and freeing oneself from the attributes of lust and darkness, one is sure to attain to an end that is very desirable.
Knowledge (ordinarily) acquired in younger days becomes weakened with decrepitude. A person, however, of ripe understanding succeeds, through the auspicious effects of past lives, in destroying his desires. Such a person, by transcending the bonds of the body and the senses like a traveller crossing a path full of obstacles, and transgressing all faults he sees, succeeds in tasting the nectar (of Emancipation).'"
Excerpted from The Mahabharata, Book 12: Santi Parva: Mokshadharma Parva