For quitting or reducing frequency of masturbation, develop the habit of slow, deep and eve (breath in and breath out to be of equal time) abdominal breathing for 10 minutes twice a day. And use this breathing when you want to calm down your sexual urge. Google abdominal breathing, learn it and practice it. This can be a stand alone practice to recover your general health as well.AS advised above, have no guilt feeling about masturbation. It is a natural habit.If you have to do it, do it with lubricated hand, do not stop breathing, do not do when you are excessively aroused, do not do in a prone position,Empty your bladder before you masturbate. To convert your sexual urge into mental energy, you may circulate your sexual urge around microcosmic orbit. This is based on Taoist youga. Google microcosmic orbit. Practice this regularly to get full benefit.
I am not a doctor, but many (most?) people masturbate before marriage as it is a general human behavior. There is no need to feel guilty nor think about death. Problems arise when it is done to excess along with excessive use of pornography. To prepare for marriage, you could cut down on masturbation or quit altogether.