If you are discouraged from praying by a consciousness of your sin, consider this example from Developing a Healthy Prayer Life by James and Joel Beeke:
"A person encouraged a beggar to beg at a king's palace. He observed that other beggars who asked there had received, that those who sought had found, and that those who knocked had the door opened to them. But the beggar hesitated; he doubted. He thought, 'I can't do that. Look at my coat, it's not nearly good enough for the king. My face is dirty, my shoes are old, my hands are filthy. I cannot beg at the king's door. He doesn't know me well enough and I haven't served him sincerely enough.' If the beggar holds to this way of thinking, in the end, he will be outside the king's blessing forever. Why? Because he is focused more on his own unworthiness than on the king's graciousness; he trusts more in his own preparedness instead of the king's mercy."