SB 11.17.25

reto nāvakirej jātu
 brahma-vrata-dharaḥ svayam
avakīrṇe ’vagāhyāpsu
 yatāsus tri-padāṁ japet
Synonyms: 
retaḥ — semen; na — not; avakiret — should spill out; jātu — ever; brahma-vrata-dharaḥ — one who is maintaining the vow of celibacy, or brahmacarya; svayam — by itself; avakīrṇe — having flowed out; avagāhya — bathing; apsu — in water; yata-asuḥ — controlling the breathing by prāṇāyāma; tri-padām — the Gāyatrī mantra; japet — he should chant.
Translation: 
One observing the vow of celibate brahmacārī life should never pass semen. If the semen by chance spills out by itself, the brahmacārī should immediately take bath in water, control his breath by prāṇāyāma and chant the Gāyatrī mantra.