Sichos HaRan 222
Translated by Rabbi Aryeh Kaplan, Rabbi Nachman’s Wisdom (Breslov Research Institute), p. 159
I heard that the Rebbe was once encouraging a man who was greatly confused about his beliefs. The Rebbe told him, “It is written that all creation only came into being because of people like you. G-d saw that there would be people who would cling to our holy faith, suffering greatly because of the confusion and doubts that constantly plague them. He perceived that they would overcome these doubts and remain strong in their beliefs. It was because of this that G-d brought forth all creation.”
This man was then greatly strengthened and unperturbed whenever he had these confusing thoughts.
The Rebbe said many times that the creation was mainly for the sake of faith. Thus it is written (Psalms 33:4), “All His works are through faith.”