The Word of God tells us that the Lord is mighty for the pulling down of strongholds. "Our weapons are not carnal, they are mighty for the pulling down of strongholds. What that means is that we have the authority to tell those spirits associated with the sin that afflicts us to go in Jesus' name.
So if you are tempted in some way to sin, be it gossip, anger, pornography, you can take authority over the spirits that are associated with those temptations.
The first step to freedom is to submit your body, mind and soul to the Lord.
The prayer is easy: Abba Father, I submit my body, mind and emotions to you and ask you to deliver me from this evil. I cast down every evil imagination and everything that exalts itself against the knowledge of God and take captive my mind to the obedience of Jesus Christ.
Then you have to repent of the activity that you have allowed yourself to be involved with.
For example: Father God, I repent of allowing the spirit of anger to reign in my soul and body. I ask you to deliver me from this evil. Spirit of anger, I renounce you and rebuke you in Jesus' name. I am blood bought and you no longer have a legal right to come against me because of what Jesus did on the cross for me. I take authority in Jesus' name and cast you out of me. Now Go! In Jesus' name.
You can replace the spirit of anger, for the spirit of (place name of spirit bothering you here).
If it's fear, then say fear, if it's doubt then say doubt. If it's the occult then say occult.
Then when you are done, ask the Lord to cleanse you. The word of God in 1 John 1:9 says, "If you confess your sins he is faithful and just to forgive you and cleanse you from all unrighteousness." Let Him cleanse you now. Close your eyes and ask Jesus to cleanse you. You may even see Him take you to a water source and baptize you. You may feel a love that brings you peace and helps you walk in shalom. Some people are more visual than others. But the Lord says, Beholding Him, we go from glory to glory. Let Him bring you to your next level with Him. Blessings and Shalom, Alice