Sometimes we are full of emotion: joy, depression, rage, fear, and instead of avoiding God, prayer is the perfect outlet for what is welling up and overflowing. I saw this in Psalm 31 and it contains verses that Jesus used in his moment of abandonment and desolation.
In you, O Yahweh I have taken refuge.Ps 31:1,5,13b,15
Into your hands I commit my spirit,
redeem me O Yahweh, the God of truth.
There is terror on every side
My times are in your hands, deliver me from my enemies and from those pursuing me.