I hope what I learned will be helpful to others, so I will write it here. When I was born I was not Jewish. I started sinning at puberty, making up fantasies. Later I started using magazines, and after about 1998 I started using the internet. I sinned about every other night. I spent about two hours in front of the computer before going to sleep. I had several relationships with women, all of which failed miserably after a while. A telltale sign was that I was not able to climax in a normal (stam) way. But I did enjoy tasmish with myself, because I was so accustomed to it. My taste became more perverse as time went on.
When I was converting Hashem broke my laptop computer. I understood and I gave up looking at pictures. However I still had constant thoughts, all day long. I was really worried about some day marrying a frum lady. I davened that Hashem should find the wife for me. He finally did, and we almost got divorced after about thirty days. I am not going to divulge details about my wife in case my identity becomes known later for any reason, but let's just say that she was extremely sensitive to being seen an object. I resented her for not making herself available to me, and we fought like crazy. Another woman would not have stayed. I am a sweet guy but I was on her case because I held a grudge against her. I stayed with her because she got pregnant. A week before my first son was born I was feeling very frustrated from my inability to stop sinning (about every other day, still.) It helped that we were now in a town with a tiny Jewish community. We had been exiled from a major community, I assume because I was a chronic sinner (it's a real shtark place.) Feeling in galus I felt I had to really go overboard to remain frum. I heard a shiur that talked about when we accepted the Torah. It says "v'ata" - and now. Meaning, if now you make a commitment it will be sweet for you. It will be work, but it will be possible, like mining diamonds. The rabbi added "well you know I don't want to make a neder because it's a terrible thing to violate a vow. So say bli neder, but you understand bli neder is not a commitment." The gemara says "ha-ba l'taher mesayem oso." Meaning, if you make a commitment, now you have siyata d'shmaya.
Being basically an idiot in Judaism and wanting to make sure my son did not have to be ashamed of his father, and being on my own I took the matter into my own hands and I made a neder that I would "do teshuva 'as soon as possible' if I looked at an erva, or thought about an erva, etc. The reason I formulated it this way was that I knew that I did not have bechira any more. Being physically addicted, the latest point where I can stop the arousal is at the initial thought. But on the other hand I must be making a choice at some point or I would not be culpable! And I figured the thought is my aveirah. Then proper regret and confession should nip it in the bud. It worked, although I had to talk to myself under my breath all day. Early and true regret actually reverses that tingling feeling down there. It's an amazing thing to actually feel it happen. I had no idea.
Shortly thereafter I had to make another neder that I would do tshuva for looking at or thinking about my wife unless she told me she was available to me. My wife and I stayed together for the sake of the kids, although over time we grew some kinship, and we did have relations, but also fought about it all the time. Eventually things really came to a head. It became clear that my neder was making my wife hate me, because she felt that as long I as I needed the neder I must view her as an object. Because of her past experiences it was really ugly for both of us. So I finally davened to die, with all the kavana. I did not want to feel that level of hatred and witness the psychological pain that she experienced because of me. I told her afterwards, adding that she need not blame herself because evidently I was a rasha and she had achieved her purpose, which was to clean me up and get me into olam ha-ba. Hearing this she forced me to go in front of our local rav, who is a chacham, and finally I agreed to annul the neder.
Since the neder enabled me to be clean for about five years, I now find that I am no longer physically addicted, and obviously I have no negative influences like pictures. Importantly, I have also replaced some of the psychological mechanisms that I had before. Whereas in the past I would have sinned to relieve stress now I use other means, usually talking to people. (That is really the essence of the pathology of someone who is addicted to sex with himself, but I am not a doctor.)
If you are troubled by the idea that the benefits of the neder came for free, you would be right. I can expand about that if you like. If I had to do it again (please, no ...) I would make a neder for a limited amount of time, like a nazir (but I would owe a korban at the end of the term!)
These are some things I have learned from this experience:
1. The neder was essential in keeping me clean long enough that I could end my physical addiction. I did not have to "hold it in." Instead, I arranged it so that I did not get aroused. Even a little bit. Once you have the bug it's only a matter of time.
2. As I said, I have learned some behaviors for controlling stress etc. It happened naturally, just from staying clean.
3. Having a neder is horrible. I would say "I am sorry I thought about her without permission (my wife)" or "I am sorry I looked at that woman" hundreds of times a day. Having a neder gives you siyata d'shmaya, but it also _generates_ an additional yetzer ha-ra. I whyspered stuff to myself constantly.
4. I would not have kept the neder except for the fact that Hashem physically injured my children (like the gemara says) at least a couple of times. That is, out of fear, not ahava. Hashem does not have a sense of humor about these things.
5. Today I would start again if I did not believe with all my heart that Hashem would pursue me until I lost my life, which is my kids, olam ha-ba, and my wife. Having a lot to lose makes all the difference.
6. Today, without the neder my yetzer ha-ra is weak, and it is easy to say "I am sorry I thought about her" when I make advances and she is not available.