“A tree is identified by its fruit. Make a tree good, and its fruit will be good. Make a tree bad, and its fruit will be bad” (Matthew 12:33, NLT).

Any gardener knows the quality of the fruit of any tree depends on the root system of that tree. When the roots are growing in deep, rich soil full of nutrients, the tree will be strong and healthy. The fruit of that tree will be juicy, sweet, and resistant to bugs and parasites.
The tree rooted in poor quality soil will have little nutrition to carry up through the trunk to the branches and leaves. The tree will be weak and susceptible to disease. The quality of its fruit will be poor. You could return year after year and pluck the poor fruit from the tree, but that would not change the health of the tree. The tree would remain sickly and vulnerable, bearing bad fruit. 
To make application of this model to your life, many if not most people seek to deal with their problems (fruit issues)through behavior modification, 12-Step groups, psychotherapy, or medication.  The reality is, if you address only your feelings and the visible problems of your life that cause you distress (fruit), you will return to committing the same actions that brought you there before. In other words, you will begin to bear that same old bad fruit in a short time. 
This is because the problem must be dealt with deep down in your tree of life. Something has caused your fruit to be bad. The only way to cause a tree to produce good fruit is to attend to the roots. You will have to deal with your sinful behaviors (fruit) by attacking the real causes (roots) in a biblical manner. In other words, you have to deal with the heart of your problem in order to overcome it. 
No matter what sin you struggle with, you have to realize that you sin because you have focused your heart on your wants, your perceived needs, your personal rights, your beliefs and desires. This results in a self-centered, idolatrous heart, which is revealed by your thoughts, words, and actions.
If you are depressed, chances are you came to believe you needed certain things or people to “make you happy.” Yet even though you may have gotten those things, you find you are still unhappy.
If you lie, you believe you will not get caught, you believe you are too smart to get caught, and you believe you are entitled to have/do/be whatever you are lying about. You are also ruled by fear.
If you are sexually immoral in any manner, you think no one is aware of your sin. You believe you won’t get caught and that it won’t hurt you. You believe you are entitled to feel good and be happy. You desire the feelings your sexual immorality brings you.
Self-focused motivations spurred on by the desires of the sinful heart have produced the kind of fruit you would expect- fear, anger, depression and discouragement and many others.
What’s the cure for the sinful fruit you struggle with? Well, it may surprise you that it is not profitable to simply pull the bad fruit off the tree, because new bad fruit will soon grow in its place. The sin you are committing is the result of the problem, not the problem itself.
The way to deal with all sin biblically is to determine the source of the beliefs, desires, and thoughts. The Bible says that the source to examine is your heart. You need heart surgery.  Not the kind done with a manual hand, but the surgery done with a perfect spiritual scalpel zeroed in on the issues of the heart that only God can reveal. 
Your heart focus must change from being “all about me” to glorifying God, and that is not a change you can do by yourself.  You must be known by God first and then seek to know Him in all wisdom and knowledge through His Word.