The best way to avoid it that I've found, is to not think of doing it for yourself. To not think of doing it from your own strength, or from the strength of God. The best way I've seen to avoid it, is to realize, that it doesn't just anger God when you do it, it hurts Him. It's literally hurting His heart, it's breaking His heart. He loves you, and has given up, sacrificed, and willed and hoped so much for you to have the ability to enter into His rest, and into eternity with Him, and lowering yourself, and the entire body of Christ into the act of masturbation, the act of ultimate lust, it's like bruising and hurting His heart.
This is the only way I've been able to stop. Out of a love for Elohim, for the Father, for Abba. It's the only thing that has been able to curve my desire. The fear of disappointing, of falling short, of hurting, of angering, of turning away from Him. I have caved, I'm not perfect, but it's helped. That, and I'll even give you my number. Whenever we feel the urge, we can text one another, and remind each other of why it's important to avoid the pitfall of it. And we can help rebuild one another, and edify one another. The best thing to do, is to pray for the strength to overcome. The second you feel the urge, drop to your knees, and pray that you won't desire it, more than you desire Him. Message me, and I'll give you my number, or we can just message on here for holding one another accountable, either way, I gotchyu brotha. Well, God's got us, but, I'll do my best.