At some point during their life, everyone reaches a place where they need someone around to encourage them. I dearly hope that that call was answered when the time came in your life. These experiences allow us to better ourselves and grow into the people we would like to become. A huge part of this upwards process of growth is helping others by using the lesson you've learned from your own struggles and applying them to assisting and encouraging others in their own growth. Big issue: knowing how to do that well.
Now, I will go ahead and say that I previously thought I was absolutely amazing at encouraging people, no matter what anyone said. I was positive that my experience with getting up from failure deemed me responsible for helping anyone else who faced similar struggles. I was wrong, also, I was going about things in the very wrong way. I found myself holding people to the same standard I had set for myself, and that is discouraging and counterproductive. The only thing that came from this type of "encouragement" was the inflation of my own ego and the diminishing of the other person's efforts. Luckily, I evaluated some better ways to encourage others when they're struggling.
First, be sure to recognize their efforts. For example, if someone is trying to increase their attendance at church, and they start going to church twice a month, do not dare reprimand them for not coming to church every Sunday. Two times a month is progress, and it is better than zero times a month. This goes along with the idea of "meeting where they are." If someone is trying to kick the habit of smoking cigarettes because they're smoking a pack a day, and you notice they are only smoking two cigarettes a day, applaud them! Bring yourself to the point that they are at, and remember how you felt in the respective place.
One of the most important things to put into practice is the difference between love and acceptance. When the person inevitably becomes discouraged at their progress, or when they stumble, continue to love them without accepting the habit. Remind your loved one that failure is an event, not a person. Listen with the intent to understand, not with the intent to respond. Let them know that they are loved and valued, but also that you do not condone what they're doing. You should not make excuses for them, nor should you allow them to make them for their actions.
Finally, reject negative comments, create positive energy, and maintain honesty at all times. If your loved one becomes dejected and down on themselves in respect to their efforts, shut that down. Allow them to understand that what they're doing is a process and that sometimes progress takes time. Tell them good things about themselves, even if they aren't in relation to their progress. This practice increases self-confidence; sometimes the little boost that comes from hearing that your smile lights up a room gives you the power to conquer the day. Most importantly, stay honest. If someone makes progress, tell them. If someone falls behind, tell them. Do not overlook the places where they fall behind. Acknowledge their strengths in relation to their weaknesses, otherwise, progress will never happen.
Encouragement is a difficult thing to do, especially when you want nothing more than to see the person succeed. Especially when you know how it feels to try.