Congratulations and we wish you a happy married life! Firstly, we urge you to reconsider the company you keep. Who are these friends who are misguiding you? The fact that you've masturbated in the past will have no bearing on your ability to have an erection, but the anxiety created due to the bad advice of your friends might just do so. Please block all such irrational suggestions in the future!  Masturbation is completely safe and healthy, and unless you're an ascetic residing in the Himalayas who has taken a vow of celibacy, all men indulge in this harmless act of self-pleasure. Yes, if it is coupled with a porn addiction or becomes a chronic daily habit (multiple times a day), then there's an issue. So don't worry about all your past, and focus on satisfying your partner.