Is Brahmacharya compulsory for a Hindu single boy?
For starters - anything you do will have results - good or bad is just the binary vision of humans.. But that's just a mechanism of life like gravity called Karma.
About maintaining Brahmacharyam or not - What is your context ? Are you going to be on the spiritual path being a Brahmachary through out your life ? or just till you grow up to get married ?
Whatever is your story, Brahmacharyam is good to maintain regardless of what you do later, what is your background, race, religion, nationality..
This is advised to anyone growing up because of the very reason this question is being asked - your mind, oorja, prana and the being is not yet formed and is trying to understand the life around.
If you break your Brahmacharya by giving in to the harmonal urges in the early stages of young-adulthood, it will absorb you into a world of halucinations, twist you in unimaginable ways and spit you out like a compressed sugarcane completely dried out of the juice of life by the time you are an adult and actually ready for a proper marriage.
You will be a reck of a life for yourself with all chaotic karmic substances stuck to you to stay with you the rest of your life.. its nothing but memory and tendancies - that is not just the usual memory in the mind - its also in the subtlest of your being, in every cell of your body, every fibre of your being, in your prana.. regardless of good, bad or ugly everything you do is yours.. it will travel with you and is your making - just remember that.
So by breaking brahmacharya before you are ready for it, bare this in mind.
On the other hand, add another angle to approach it - these things are more about 'compulsions' which are driven by freshly brewing harmonal activity in the body.. But if you rise your 'consciousness' by doing Yoga, involving yourself in community/ social/ spiritual activies or services, you will develop a clearer mind to take decisions like this and very well aware and know when you are ready to take the next step in life.
All the best for your Brahmacharyam. It is much needed for every human - is it for a lifetime or a certain period of time, depends on the individual's plans, tendencies, intentions..
Is Brahmacharya compulsory for a Hindu single boy?
Yes, it is. I myself am in early twenties, I know that controlling hormonal urges is most difficult thing. I too did same mistakes. Firstly let's clear the thing, that not only singles/bachelors but also married person must stay in Brahmacharya. Marriage is not a certification to break Brahmacharya. Astringent rules apply for Grihastas too.
But let us answer a simple question, Why do one do it?
Being a Biology student the answer is, that's because, when the semen comes out from the epididymes, it travels through Vas deferance, & thus peristalsis occur due to release of Oxytocin.
In simple terms, the tube carrying semen does peristalsis & oxytocin (feeling good hormone) is gushed in body, due which a sense happiness or it won't be wrong to call a short period of esctacy appears to the person & thus gets addicted to it just like drugs. (Thus in Kaulamarga this is one of the panchamakar, as it gives ecstasy feeling too).
Now, those who seriously want to do Brahmacharya, think, is this what the bliss we are seeking? Is this even a bliss?
This is faked up thing, real bliss is when you realize your true self. When you start rolling tears like Meerabai, Chaitanya Mahaprabhu, Ramakrishna Paramhamsa, Bamakhepa, Ramprasad.
Moving to major part,
What should be do if we are not able to maintain Brahmacharya?
There is no substitute to Brahmacharya. Just like, the hunger for food can't be subdued by breathing. The importance of Brahmacharya can't be compensated by any act.
Now, since that you already thought what you must do. This is the first step that shows honestly you are already moving forward on spiritual path.
The answer here is in 2 parts,
1st mentally trying to block such thoughts
2nd to avoid the act
By this time most get addicted to the act.
Doing it even once a year is addiction, leave alone 2-3 times a week as I read in comments earlier. But, by my perosnal experience, you must not force abstinence. Because, Brahmacharya means complete rid of lust even in thoughts. And, if you force upon Brahmacharya, all you end up is having more sexual thoughts, lol. Thus, you must dettach from within from the act. This can be easily achieved with getting cringe & self realization in it. See some self questioning or self realization ideas.
Whenever you have an urge, think of-
Maharishi Vishwamitra, who was doing tapa to be a Brahmarishi. He was lured by apsara Menka & thus he lost the fruit of 1000 years of tapa just for the momentary pleasure of few hours. And he lost the position to be Brahmarishi. Imagine if he lost his 1000 years of tapobal. What are we in front of him? And thus can we bear the cost to loose the mere tapobal we gathered?
(Ps- I myself rever Vishwamitra, and ain't looking down, but it's just to explain the topic.)
Whereas, Nara Narayana the two sons of Dharma didn't even looked at apsaras & completed their tapa & became more tejasvi.
If you know there are thousands of mahatmas, and saints waiting to enter a womb of parents who are astik. But, if you waste your sperm just for the happiness of few minutes or hours, have you thought firstly how many maha purush lost the chance to be born & show direction to world & secondly that maybe you lost the chance to be the father of next Ramkrishna or Meerabai maybe.
So, ask yourself that you leave everything to study about bhagwan & his leelas. You do puja to get Satchiddanada. But, you drain energy in the act itself. Is this worth? By being lusty, what have not happened in Itihas?
Ravan was killed, Kauravas died, Shumbha- Nishumbha, Jambasura, Bhasmasura all died of lust. Even Indra was cursed for lust.
Have any lusty man ever achieved anything? Ask yourself ! Self realization will spark in you.
See don't go by scientific figures that having the act once a week is healthy.
Lol, Indra had been with Ahilya for few hours & see for how many years he was left cursed. Even one second of lust, had got Brahmadev ashamed.
Now the tips here are from personal experience, with shastra citations wherever possible. Thus, maybe they might help you.
First, since the biggest driving factor is mostly porn material or even onlooking the favourite person. Remember you might not watch such things in your puja room! Apply the same concept here.
व्याप्तम येन चराचरम
Remember this, Bhagwat tatwa is present everywhere. So, if you think behind the closed doors the devi isn't looking on you, you are wrong.
She is everywhere. So, can you niw see the porn anywhere? Forget it, since your mother or father is watching you always.
The second instruction comes from tantra,
Never see your Kulashakti disrobed, except in Kulachakra.
It means, a person must never see his own wife disrobed except for rituals (since seeing other women is out of question already). Since, you are bachelor, think what are you doing? You are seeing somebody's daughter, mother or sister. Who too is devi herself.
Devi Mahatmya, 11th chapter,
Oh, devi all vidyas are part of you, and all women are the embodiment of you in this world.
(If watching gay porn think, the guy is Bhairava himself. The motto here is to not refrain from discusing possibilities, but to uproot the very basic problem.)
Also, if one has objections that seeing a female pornstar as Devi or male as Bhairav is unfit,
Shaktisangama Tantra, Kali Khanda,
All men are Mahakala, all women are the nature of Kali and Tara, When one percives in this way, there is no more imaginary samsara.
Hope this much is enough to get you cringe already from porn. Because, you can never see Jaganmata in Kamarata with Jagadpita. And, if still the mind doesn't obeys, think of Kalidas, who was cursed to death by Parvati just because he merely described Kaam vihar of Amba with Shiva, hope what in heavens might wreck on you after you think of this bhavana.
Secondly, since the act needs a space.
You can put a favourite picture of your isht in the place where you do the act. And think, can you merely have that act in front of the isht? If you are Hindu enough you know, vigrahas have prana they can see and hear. Just like that think, images have prana too, & bhagwati is watching. Imagine a mother watching his own son doing such acts ! Cringe already, I know! Or the next is to meditate upon Chinnamasta tatwa. She stands upon copulating Rati & Kama. Just think, she tramples lust beneath her feet. And still you think, you can ever reach your deity with lust in you ?
Thirdly at times if lust is too high to be kept in pants (srry for the words).
Go for it, but while you are in act you must contemplate upon Bhagwan / Bhagwati. Believe me, half of your lust will be killed at that moment itself. You must seek help from deity in that condition too. Ask them to kill your lust. As, I explained earlier in biology, just near to ejaculation or while it is happening a short esctacy state appears. Contemplate upon your isht there. Don't worry, it is a sin, I know. Yet, think you are doing a big sin by waste sperm which could have led to your spiritual progress. (Ps-The concept is same to mediate upon devi in that state. But, if the person if able to do this, by this the person himself will feel awkward that how can he do that while remembering the isht. This is process of detachment & that shame will never allow you to do that act. May bhagwati forgive.)
Also, minimize use of anything that will excite you more like watching porn or even using lubricating agents like oils. (Once again srry but this is honestly needed, so that you stop enjoying the act, as these acts as major factor to excite. But instead you must start feeling cringe in it is our main motto, by which you yourself will leave this act from within & not by forcing shastras or making mind.)
As dettachmemt are of three types,
1st - Dettachment that comes with incidents (this dettachment is short lived)
2nd - Vow to be dettached (vows might break if will power is not strong)
3rd - Dettachment from within (This is said tocbe best type even in shastras. And this is what we want to achieve from doing all this.)
Also, punish yourself after you are done with the act. So, that next time you fear yourself.
This is not one day trick. Have patience, it takes 2-3 month. But believe me if you follow this, you will definetly be able to overcome this.
May Paramba & your isht bless you with inner strength to overcome this.