Jesus told a parable of two men who went to pray. One was a Pharisee who self-justified himself in prayer and the other a tax collector who humbled himself in prayer. When we approach God in prayer, we do it through the Lord Jesus Christ. If we have not believed on Jesus Christ as Savior we are considered sinners and have no access to God in prayer.
The Pharisee instead of examining himself was examining the tax collector standing at the same temple in prayer. He compared himself to the tax collector and considered himself superior. (Luke 18:11-12) "The Pharisee stood and prayed within himself in this way: God, I thank You that I am not as other men are, extortioners, unjust, adulterers, or even like this tax-collector. I fast twice on the Sabbath, I give tithes of all that I possess." On the other hand the tax collector prayed, (Luke 18:13) "And standing afar off, the tax-collector would not even lift up his eyes to Heaven, but struck on his breast, saying, God be merciful to me a sinner!" Instead of recalling the faults of others we must confess our faults before God.
Before praying a self-examination is necessary and is done regularly. Brokenness is essential in prayer. Faith is a very necessary in prayer. (Heb. 11:6) "But without faith it is impossible to please Him, for he who comes to God must believe that He is and that He is a rewarder of those who diligently seek Him." We need to place prayer as a priority in our life and join self-examination to it. This lets us know where we stand before God and men and live a life that pleases God.