Masturbation is an activity that sex researchers and sex therapists believe to be healthy. In fact, we recommend it in many cases.
Masturbation offers a sexual outlet when there is no partner in a person's life.
Sexual urges do not instantly vanish when a person is without a partner, even though certain philosophies believe that they should. Talk with a counselor about your experience with masturbation. If it falls into either of the two categories I listed in the second paragraph, then work with that counselor on it as a compulsive behavior. If you masturbate without creating either of the types of problems I mentioned there, then speak with that counselor about the guilt that you feel and where that guilt may have originated. I think it would be helpful.