Sichos ha-Ran 12
Translated by Rabbi Aryeh Kaplan, Rabbi Nachman’s Wisdom (Breslov Research Institute) pp. 116-117
When people want to become truly religious and serve G-d, they seem to be overwhelmed with confusion and frustrations. They find great barriers in their path and cannot decide what to do. The more they want to serve G-d, the more difficulty they encounter.
All the enthusiasm that such people have when trying to do good is very precious, even if their goal is not achieved. All their effort is counted like a sacrifice, in the category of (Ps. 44:23), "For Your sake, we are killed each day, we are counted like sheep for the slaughter." The Tikuney Zohar states that this verse speaks of both prayer and sacrifice.
When a person wants to pray, he encounters many distractions. But still, he gives himself over entirely to the task, exerting every effort to pray properly. Even if his prayer is not perfect, his very effort is like bringing a sacrifice, in the category of “For your sake we are killed each day."
The same is true of everything else in religion. You may wish to perfect yourself, but find yourself unable to do so completely. Still, the effort and suffering involved in the frustrated attempt are not in vain. They are all an offering to G-d, included in the verse. "For your sake we are killed each day, we are counted like sheep for the slaughter."
Therefore, always do your part, making every effort to serve G-d to the best of your ability. Whatever task lies in your hand, do it with all your might (Eccl. 9:10).
Keep it up, even when all your efforts seem to be frustrated and all your attempts in vain. Do everything in your ability, and G-d will do what is good in His eyes (1 Sam. 3:18).
 Tikuney Zohar 21 (59a). Cf. Likutey Moharan B 46, Sichos Moharan 36a (#138), Alim LeTerufah 15.