If you’re feeling doubts, you should probably be praying to God about that, first.
Also, I think James isn’t talking about the guy who is worried about a few questions of faith, or who sometimes has nightmare doubts in the middle of the night. He’s talking more about someone who really is “double-minded,” or “double-hearted,” or even “double-souled.” (di-psychos) The Didache pairs this expression with “double-tongued,” another thing one shouldn’t be. (We would say, “speaks with a forked tongue.”)
We would probably say that a double-minded person is “two-faced.” So he’d be somebody talking out both sides of his mouth when he’s talking to God. He’d say to himself, “Well, I know God isn’t real, but I’ll pray because it sounds good to people around me.” So he’d pray to God, sounding really sincere, but not meaning a word.
Often “double-minded” is interpreted as pretending to be for God, but really living for the world; or sometimes, of trying to have both God and the world.
Lying to God or other people about what you really think, and just going along with whatever is popular, makes you “wavering.” You don’t have any strong ideas or principles to keep you in one place. If you’re trying to work for both God and the world, this can make one indecisive and also “wavering.”
On the other hand, somebody who’s saying, “Well, Lord, I don’t know if You’re real, but I know that if You are real, I can trust You,” is being very honest with God. He’s not double-minded. He is saying what he thinks. So if you’re confused, say “Lord, I’m confused. I don’t know what’s true. Please help me out.” God will be pleased to hear you.
The Book of Job also indicates that God is prepared to work with somebody who has questions or is angry and unhappy with Him, as long as you’re not lying to Him or insulting Him. He’s more angry with people like Job’s “friends,” who cover up problems with false explanations, than with people who bring problems to Him and ask about them.
So let’s go back to James again:
But if any of you want wisdom, let him ask of God, who giveth to all men abundantly, and upbraideth not; and it shall be given him.
But let him ask in faith, nothing wavering. For he that wavereth is like a wave of the sea, which is moved and carried about by the wind. Therefore let not that man think that he shall receive any thing of the Lord. A double minded man is inconstant in all his ways.
So basically, “If you need wisdom, ask God for it. But don’t ask if you don’t really mean it.”