"If any case is too difficult for you, bring it to me...." (Deut. 1:17)

The Baal Shem Tov used to cite a teaching of the Ramban (Nachmanides), who advised his son the following: "Whenever there are various possible options of how to go about doing something, and you are in doubt as to which is the best way, or if you are in doubt whether or not doing it is G‑d's will, in which case it should be done, or it is against His will, in which case it should not, this is what you should do. First of all, detach yourself from any personal gain or honor you might derive from this action. Only then can you objectively weigh the options, for if it is something from which one can derive personal gain, one will search to find some way to permit even the forbidden. But if you do as said, G·d will guide you to the truth and you can feel secure that you are doing the right thing."
...if you don't know how or whether at all to do something, the doubt is arising from within you...
The Baal Shem Tov employed this teaching of the Ramban to explain the [inner] meaning of the verse [quoted above]. "If any case is too difficult for you," that is, if you don't know how or whether at all to do something, the doubt is arising from within you because of the personal gain that you would derive from doing it. Therefore, detach yourself from the personal gain you would derive from doing it, and "bring it to Me" - that is, intend to do it for the sake of Heaven, without any motive for personal gain. Then [as the verse concludes], "I will hear it." I will make it heard - I will give that person the understanding how to behave.

Note:
The Baal Shem Tov adds to the Ramban's teaching that all doubts and difficulties we confront in life arise from our being out of touch with G·d and with our deepest selves. Instead, we live superficially, from momentary and ephemeral physical pleasure to the next momentary and ephemeral emotional gain, completely out of touch with what our souls deeply crave and need. We are thus torn in different directions at once, for we all have conflicting desires and interests. Only when we are able to see through those pleasures and gains, and touch with our deepest needs and with G·d, are we able to act assuredly from a place of Truth. (Sefat Emet, Deuteronomy 5631; Likutim, Lech Lecha)

[From Keter Shem Tov, Section 6. Translation and commentary by Rabbi Yehoshua Starrett. Reprinted with permission from //baalshemtov.com.]