Let me start by telling you that I've been in your situation too. So, you are not alone in this.
Denial, repression, justification and guilt: these are four responses/reactions/habits/behaviors that are useless and even harmful when trying to overcome some unwholesome pattern.
If you notice that something is unhealthy (whether for your mind or for your body), you can overcome your obstacle without the need of those four mentioned reaction.
The first step is to accept that something unskillful is being done. I chose the word 'unskillful' over 'bad', because the latter has some culturally loaded and might imply moral connotations. But in this specific situation, if I stick to your post, there's nothing inmoral being done. Understand that and learn to take away from you that innecesary moral shame. Apparently, you are not harming anyone else.
Secondly, you should understand that what you are experiencing are the fruits of some ingrained habit. Your mind has learn how to react under certain stimuli or conditions (those being both internal -from the mind- or external). That habit is NOT "you". That learnt pattern is the consequence of conditions that came together out of your control and will; for instance, you were in your teenage years, you were confused by your feelings, you wanted some information, and some information came to your hand, casually, the one telling you that masturbation was normal. And it is! It is a normal behavior, in the sense that statistically, most people do it a lot at some point in their lives. But to this particular matter, statistics have nothing to do with this, because you want to get rid of something you perceive as detrimental to your mental well-being.
Let me do a little digression about that last point: keep in mind that the buddhist teachings were directed to two main target audience: householders and monks/nuns. And most restrictions and rules were focused that second group. To householders, lay-people and normal citizens, there were some precepts recommended for a ethical and skillful living. For most of them, their goal life was to live a happy worldly life (not in a derogatory sense of the word "worldly", but as in contrast to life in monastic reclusion), with families, jobs, possession, houses, projects, hobbies, etc. Relinquishment of these worldly goals and ways of life is not a requisite for holseholders; for them, the precepts (5 or 8, depending on you level of commitment to the buddhist path) are more than enough.
https://en.m.wikipedia.org/wiki/Five_precepts
https://www.accesstoinsight.org/ptf/dhamma/sila/atthasila.html
Back to the second point: as I said, you are not the habit. There is nothing to be called "you" in that behavior (nor in anything you consider as part of "your" identity, but that goes beyond the point. For more info on that, I'll put some references below). And so, it is useless and a illusion to get involved with that sexual desire in a personal fashion. A wise and skillful way to respond to such desires is to observe them in an impersonal way, just like when a zoologist is trying to look for some animal in the forest to study its appearence and behavior. Try doing the same with that mental event: when desire arises, instead of thinking "Oh no! Here comes this desire again. I'm so weak" or something alike, notice the desire, and tell to yourself "desire", and so your mind will know what just happened and won't get involved in a personal way, getting carried away by the streams of negative emotions. If you let yourself be carried by guilt and anger because of your desire, then you will feel angry and guilty for feeling anger and guilt for the desire, and so on; and so, an endless cycle of anger and guilt goes on and on. After the desire (or any negative process) was identified and labelled, let it go, feeling the tension in your body as it becomes relaxation. For some (myself included), this process of "labelling" your unskillful and unwholesome reactions is a very effective way to alter the usual way your brain reacts to situations and stimuli.
Notice how, by doing the above mentioned, you are not denying nor repressing your feelings; you are recognizing them, and choosing wisely what to do with it. By doing this, you will start modifying your habitual reactions. Your main tool to doing so is your attention and awareness: pay attention to your mind and body, but stop assigning any personal feature to these mental and bodily processes: they are just habits and processes, nothing more, nothing else. Notice them as they arise and go away. If you give them more importance than due, you feed such negative behaviors; but if you take away their nourishment, they will starve and cease to exist.
In third place, it is useful to understand how preferences (likes and dislikes) are created. Some of them a formed by association between an already pleasent stimulus and some neutral stimulus. Others are formed from the development of ideas about what is good and what is bad. But independently of the process of origination of preferences, desire and aversion depend on our perception of the world and the stimuli we face in our daily lives. And perception is conditioned and influenced by our worldview and thoughts. What we think is 'good', we desire; what we consider 'bad', we want to escape from. But those categories and labels are subjectively created, and those labelling do not depend on the object/phenomena itself, but on how does your mind interpret and perceives such objects.
So, you could start by asking to yourself some questions like: when does sexual desire arise most frecuently? And why does it arise at such occasions? What do I perceive as desirable, and why? Is the object of desire satisfying by itself? If I obtain what I desire, will my search for it disappear permanently? Why do some objects in some context give rise to those desire, while in other contexts do not? Am I attached to the object itself or to whatever the object makes me feel? Did I always feel this way about the object of desire; if I haven't, then why?
Remember to use the same logic before explained when asking those questions to yourself: whatever feeling arises, notice it impersonally, try to identify it, and once you learn from it, let it go. And the next time that feeling arises, you will be acquainted to it, and the whole analysis won't be necessary. And maybe sometimes new conclusion may appear as your attention and understanding get sharper everyday.
Ajahn Chah, a wonderful Thai monk and teacher, explains it this way:
- Someone recently asked me, "As
we meditate and various things arise in the mind, should we investigate them or just note them coming and going?" If you see someone passing by whom you do not know, you may wonder, "Who is that? Where is he going? What is he up to?" But if we know the person, it is enough just to notice him pass by.
You can find an anthology book with this quote in here:
http://www.ahandfulofleaves.org/documents/No%2520Ajahn%2520Chah.pdf
And lastly: be kind to yourself. Patience, kindness, consistency and honesty are key. Let attention become your best friend, and don't turn that friend into a police officer waiting to give you a ticket everytime you feel anything unwanted.
If you think about masturbation as a big issue, it will be a big issue. If you see it simply for what it is (a habit caused by conditions and events that came together out of your control and will), changing your mind will become way less tedious and distressing.
EDIT: I added a few more details concerning perception and subjectivity.
EDIT 2: As someone suggested, the use of the words "unfortunate conditions" may be misleading. I rephrased it as "conditions that came together out of your control and will".
And the links about the wrong pespectives on identity and the "self":
https://www.accesstoinsight.org/lib/authors/thanissaro/selvesnotself.html
https://www.insightmeditationcenter.org/books-articles/articles/anatta-and-the-four-noble-truths/
https://secularbuddhism.org/2012/07/14/if-not-self-then-what/
And here are two videos by Ven. Yuttadhammo about how to use the "labelling" method in your daily life and in your meditation sessions, and about how to deal with masturbation and addictions in general:
https://youtu.be/hLvU7ppM4vE
https://youtu.be/W5Lg9P-VekA
May you have a wonderful and peaceful life!