Make the danger more real
Sometimes we excuse our behavior and say that the Yetzer Hara causes us not to think straight and therefore we do the wrong thing. But if the Yetzer Hara tried to get us to stick our hand in fire, would we let ourselves get confused? No! So why do we let him muddle our minds when it comes to forbidden pleasures? The answer is, we are lacking in Emunah. If our Emunah would be stronger, we would see these sins as fire and we wouldn't let ourselves become confused by the Yetzer Hara. So how do we indeed strengthen our Emunah? After all, when we are feeling weak, and we can't see the truth before our eyes, it is hard to picture these desires as dangerous as a burning fire! One good piece of advice is to make the danger more real to yourself. Some people, I have heard, have even resorted to making a resolution to burn themselves with a match before letting themselves sin. This often helps them refrain from sinning altogether. But this might be too extreme for most people. Instead, accept upon yourself to give a dollar to charity every time you let yourself lust, or gaze at that something forbidden, (say, for more than 2 seconds). And maybe resolve or even make a Shavuah to give $10 to charity before you let yourself masturbate. In other words,start to feel the danger, the pain and the loss of every time you slip. This will help you bring up that which you truly do believe deep down, and make it much easier to break free.