Many of the Psalms, like Psalms 10, are prayers and should be used as guides for us in our communion with the Father. Much of this Psalm, however, sounds like someone groaning about how much the wicked are prospering and how much they are suffering. Are we to pray that way? In a word, Yes. This is called a lament.
A lament is simply an expression of grief offered up to God. It is simply the reflex of the broken heart and God loves to hear His children crying out to Him when their hearts have been broken. This does not mean that He loves to hear His children writhe in pain. Not at all! What He loves is when His children, even in their pain, cry out to Him in hope! (see v.16-18)