... notwithstanding of our being thus abased and truly humbled, we should be animated to pray with the sure hope of succeeding. There is, indeed, an appearance of contradiction between the two things, between a sense of the just vengeance of God and firm confidence in his favor, and yet they are perfectly accordant, if it is the mere goodness of God that raises up those who are overwhelmed by their own sins. For, as we have formerly shown (chap. 3: sec. 17. 2) that repentance and faith go hand in hand, being united by an indissoluble tie, the one causing terror, the other joy, so in prayer they must both be present. This concurrence David expresses in a few words: "But as for me, I will come into thy house in the multitude of thy mercy, and in thy fear will I worship toward thy holy temple," (Psalm 5:7.) Under the goodness of God he comprehends faith, at the same time not excluding fear; for not only does his majesty compel our reverence, but our own unworthiness also divests us of all pride and confidence, and keeps us in fear. [emphasis added] John Calvin, Institutes of Religion Book 3.20.11Looking at chapter 17.2 in Book 3 to which Calvin refers the reader we find:
For this reason, the promises offered in the law would all be null and ineffectual, did not God in his goodness send the gospel to our aid, since the condition on which they depend, and under which only they are to be performed--viz. the fulfillment of the law, will never be accomplished [i.e. by us]. Still, however the aid which the Lord gives consists not in leaving part of justification to be obtained by works, and in supplying part out of his indulgence, but in giving us Christ as in himself alone the fulfillment of righteousness. For the Apostle, after premising that he and the other Jews, aware that "a man is not justified by the works of the law," had "believed in Jesus Christ," adds as the reason, not that they might be assisted to make up the sum of righteousness by faith in Christ, but that they "might be justified by the faith of Christ, and not by the works of the law," (Gal. 2:16). If believers withdraw from the law to faith, that in the latter they may find the justification which they see is not in the former, they certainly disclaim justification by the law. Therefore, whose will, let him amplify the rewards which are said to await the observer of the law, provided he at the same time understand, that owing to our depravity, we derive no benefit from them until we have obtained another righteousness by faith. Thus David after making mention of the reward which the Lord has prepared for his servants (Ps. 25 almost throughout), immediately descends to an acknowledgment of sins, by which the reward is made void. In Psalm 19, also, he loudly extols the benefits of the law; but immediately exclaims, "Who can understand his errors? cleanse thou me from secret faults," (Ps. 19:12). This passage perfectly accords with the former, when, after saying, "the paths of the Lord are mercy and truth unto such as keep his covenant and his testimonies," he adds, "For thy name's sake, O Lord, pardon mine iniquity: for it is great," (Ps. 25:10, 11). Thus, too, we ought to acknowledge that the favor of God is offered to us in the law, provided by our works we can deserve it; but that it never actually reaches us through any such desert. [emphasis and bracketed comment added]Indeed. The favor of God offered in the Law is secured for sinners only by Christ's perfect obedience for them. And so it is that the grace of God in Christ as offered in the Gospel and received through faith alone is that which brings sinners into the favor of God offered in the Law (Romans 10:5-11). Believers are saved by works yet not those of their own... but by the righteousness of Jesus Christ, the perfect and acceptable works of his obedience and his sacrificial death on the cross for them.
Back to prayer. Calvin is making the point that we are miserable sinners and yet beloved of God. And as we come to the heavenly throne of grace in prayer we should not ignore nor dissemble concerning our sinfulness, our lack of faith, and coldness of heart. We feel the weight of those stains on our words even as we direct them heavenward. Calvin is expressing a wonderful thing here. There is no dissonance in the fact that my sins are all too present as I approach the Holy of Holies. In his presence, God's holy Law does what it is meant to do - it shines light on sin. So it is in our want of personal righteousness that God meets us with his mercy and favor in Christ as we pray. As the Spirit of God highlights our infirmities at one moment, at the next he directs our hearts to his mercy touching us with the provision of Christ's healing perfection. It's in this way that we approach our heavenly Father with the assurance of full acceptance, not hiding or minimizing our sins but owning them and taking refuge beneath the blood of our Mediator and Advocate, Jesus Christ.