“like a deceitful brook, like waters that fail?” This is a reference to a physical attribute of Israel that was well known, and thus it is similar to a custom or idiom because you have to know the land of Israel to understand it.
The majority of the streams in Israel only flow during the rainy season. Thus, at some point during the dry season they stop flowing, but the exact time that happens depends on the amount of rain that fell that year, how long the rainy season lasted, etc. That meant that if a person needed water, if the dry season had started they could never really be sure if the stream would still be flowing or if it had already dried up. The ironic thing about those streams was that often during the rainy season there was water in lots of places so the streams were not quite as necessary, but then late in the dry season when they were really needed, they did not have any water.
Jeremiah is asking God if He is like that; like a stream that only provides water during the “good” times and then stops providing when conditions get tough. It can seem like in the good times, when we do not need God’s comfort, it is there in abundance, but then in the tough times God’s comfort is not there. Jeremiah’s statement, expressing some doubt in God, brings a quick and stern rebuke from God (Jer. 15:19).
We can rely on God all the time, although sometimes it may not seem that way. Sometimes our pain and grief are so great that it makes God seem abnormally distant, and we expect more from God than we should. God is God, and life is difficult, and we need to have the strength and confidence to bear up in difficult times and not expect to be somehow coddled by God. In Jeremiah 15:21, God assures Jeremiah that He will deliver him, and we can rely on God’s deliverance too. But, as we learn from Proverbs, that does not mean that He will support our wrong expectations. We have to walk righteously and with wisdom.