We don't often think of complaining to God as a type of prayer, but the Catechism of the Catholic Church highlights the unique prayer life of the prophets.
In the Old Testament, God inspired a number of prophets to admonish the people of Israel and to return to the Lord. This wasn't always an easy mission, and some prophets even ran away from God.
Yet, the prophets had hearts open to God's will and were strengthened by the encounters they had with him.
In their "one to one" encounters with God, the prophets draw light and strength for their mission.
Often these prophets were called out into the desert, like Elijah, but, "their prayer is not flight from this unfaithful world, but rather attentiveness to The Word of God" (CCC 2584).
When many of the prophets were sent to the people of Israel, they would throw-up their arms and complain to God, frustrated by the experience. These complaints were then turned into prayers.
At times their prayer is an argument or a complaint, but it is always an intercession that awaits and prepares for the intervention of the Savior God, the Lord of history.
Underneath their complaints was a deep trust in God and in his divine plan.
This is a central key for discerning our own complaints to God. When we are mad at God, do we still trust him?
God wants to hear our complaints and is the best listener. We need to keep in mind God's goodness, trusting that throughout every trial we might have, he still loves us.