Hi there ~Masturbation
is a normal process and the urge to do so is physiological. I do not think that it has anything to do with having a healthy baby. However if you believe that psychologically, it might be best to avoid masturbating and concentrate on having a baby by having intercourse. The more the amount of intercourse you have with ejaculations the more the chances of you getting your wife pregnant. I hope this helps. Please consult a doctor if you are having problems with conceiving a child with your partner.
Take care and have a lovely day!