Are there any biblical references that indicate that it's ok (or not ok) to bring any doubts to God in prayer?
The answer is an absolute Yes. It is not only in prayers and not only in the Old Testament but in the New Testament too:
It is important to see that Jesus himself endorses a critical stance.
Thomas the Apostle speaks (John, 20, 25):
Jesus endorses this attitude and bothers to get back to Thomas to give him proof (John, 20, 27):
And finally (John, 20, 29):
So the Bible makes it very clear that Jesus wants us to not just be gullible but to demand proof. Neither of the Apostles was prepared to believe without a proof and Jesus respected that and had this very story been incorporated into the Bible for us.
Yes, most of the Psalms!
The Psalms express deep doubts about God - "where are you?", "Why are you letting your faithful people be oppressed?", "Why am I in such pain?", etc. You can find the full range of human emotion in the Psalms, expressed directly and honestly to God. If David can do it, we can do it.
Copy / paste from original answer on closed question.
Yes. And God's grace is such that you can just be honest. Consider Mark 9:24, one of my favourite NT verses:
'Immediately the boy’s father exclaimed, “I do believe; help me overcome my unbelief!”'
Doubt mixed with faith is natural. Jesus' response is not recorded - so apparently He was neither surprised nor condemning.