There is this following atonement prescribed in Manu Smriti.
Manu Smriti 11.118. But a student who has broken his vow shall offer
at night on a crossway to Nirriti a one-eyed ass, according to the
rule of the Pakayagnas.
Voluntary waste of seminal fluid amounts to breaking of the vow for a Brahmachari student.
EDIT- As shown in this answer breaking a vow is an upapAtaka or a minor sin.
And upapAtaks can be atoned by applying the following means as well. IMO, these methods are relatively less cumbersome to perform than the one given above ( donating one eyed ass etc).
Manu Smriti 11.258. Or if, pure (in mind and in body), he thrice
repeats the Samhita of the Veda in a forest, sanctified by three
Paraka (penances), he is freed from all crimes causing loss of caste
Manu Smriti 11.259. But if (a man) fasts during three days, bathing
thrice a day, and muttering (in the water the hymn seen by)
Aghamarshana, he is (likewise) freed from all sins causing loss of
Among the two, i think the second one is easier. It just involves fasting, bathing three times in a day and also reciting the Aghamarshana Suktam which is found in the Rig Veda.