8 Agreeably with this, we ought to understand that God, though He give not to our will, does give for our salvation. For sup pose the thing you have asked be to your hurt, and the Physician knows that it is to your hurt; what then? It is not to be said that the physician does not give ear to you, when, perhaps, you ask for cold water, and if it is good for you, he gives it immediately, if not good, he gives it not. Had he no ears for your request, or rather, did he give ear for your good, even when he gainsaid your will?
Then let there be in you charity, my brethren; let it be in you, and then set your minds at rest: even when the thing ye ask for is not given you, your prayer is granted, only, you know it not. Many have been given into their own hands, to their own hurt: of whom the apostle says, “God gave them up to their own hearts' lusts.” Some man has asked for a great sum of money; he has received, to his hurt. When he had it not, he had little to fear; no sooner did he come to have it, than he became a prey to the more powerful.
Was not that man's request granted to his own hurt, who would needs have that for which he should be sought after by the robber, whereas, being poor, none sought after him? Learn to beseech God that you may commit it to the Physician to do what He knows best. Confess the disease, let Him apply the means of healing. Only hold fast charity. For He will needs cut, will needs burn; what if you cry out, and art not spared for your crying under the cutting, under the burning and the tribulation, yet He knows how far the rottenness reaches. You would have Him even now take off His hands, and He considers only the deepness of the sore; He knows how far to go.
He does not attend to you for your will, but he does attend to you for your healing. Be sure, then, my brethren, that what the apostle says is true: “For we know not what we should pray for as we ought: but the Spirit itself makes intercession for us with groanings which cannot be uttered: for He makes intercession for the saints.” How is it said, “The Spirit itself intercedes for the saints,” but as meaning the charity which is wrought in you by the Spirit? For therefore says the same apostle: “The charity of God is shed abroad in our hearts by the Holy Spirit which is given unto us.” It is charity that groans, it is charity that prays: against it He who gave it cannot shut His ears.
Set your minds at rest: let charity ask, and the ears of God are there. Not that which you wish is done, but that is done which is advantageous. Therefore, “whatever we ask,” says he, “we shall receive of Him,” I have already said, If you understand it to mean, “for salvation,” there is no question: if not for salvation, there is a question, and a great one, a question that makes you an accuser of the apostle Paul. “Whatever we ask, we receive of Him, because we keep His commandments, and do these things that are pleasing in His sight:” within, where He sees.
Source: Homilies on the First Epistle of John (New Advent)