The lament psalms — Psalms 10, 13, 22, 44, 73, 88 — are addressed directly to God in the second person, in complaint. Psalm 44:23–24 goes so far as to command God: "Awake, why sleepest thou, O Lord? arise, cast us not off for ever... wherefore hidest thou thy face?" This is accusation, not prayer as usually taught. And it is in the canon. The inclusion of lament in Scripture is a theological statement: anger brought directly to God is not apostasy. It is relationship.
James 5:11 points to Job specifically as an example of patient endurance: "Ye have heard of the patience of Job, and have seen the end of the Lord; that the Lord is very pitiful, and of tender mercy." Job was not patient in the conventional sense — he argued, accused, and demanded answers. What he was patient in was continuing to bring his case to God rather than abandoning the relationship. Anger that stays in conversation with God is different from anger that walks away.
Commentary is from a charismatic Protestant perspective, drawing on KJV text and public-domain sources including Spurgeon, Andrew Murray, and Matthew Henry.