Hello
Thanks for using doctor spring for posting your query.
I have gone through your question in detail and I can understand what you are going through.
Doing masturbation is not bad and it is ok to do it daily as it is a safe way of expressing your sexuality. But if you are distressed with recurrant urges of thinking about sex and doing the act of masturbation then it could be a type of sex addiction. It needs to be managed medically and you should seek a psychiatrist. Carbamazepine and naltrexone are the drugs which are helpful in these conditions. Moreover one needs to evaluate for the underlying depression as depression can also lead to such kinds of problem.
Regarding you dicision to get married, you can and should get married. If you are having erection after seeing visual images then most certainly you will do good with your wife as well.
Get married and start having proper sex. If the symptoms persist then there is a need of medications.
Hope that was helpful
Regards
Wish you good health
Dr. Srikanth Reddy