 Use your willpower. Use discipline. Use accountability. Use the practical measures that can be exercised by your free will to help keep you pure. While you do those things, remember that ultimately it's a work of the Holy Spirit. He's going to help you. Get up. Try it again. He's not going to give up on you. He's not going to reject you. He's not going to cast you aside. He works with you.