Pray firstly to be purified of passions, secondly to be freed from ignorance and forgetfulness, and thirdly to be delivered from all temptation and forsaking.
The evil spirit tries to scatter prayer as if it were a sand heap, tries to turn the words into dry sand, without coherency or moisture - that is to say, without fervor of heart. Thus prayer may become either a house built on sand or a house built on a rock. Those build on sand who pray without faith, absently, coldly: such prayer is scattered of itself, and does not bring any profit to him who prays; those build on a rock who, during the whole time of their prayer, have their eyes fixed upon God, and pray to Him as to a living person, conversing face to face with them.
The most important thing in any good effort and the height of all activities is to persevere in prayer, by means of which we can always acquire through supplication the other virtues from God as well.
You describe how bitterly you regret the inefficacy of your prayers. Beware: to wish for consolation or revelation in prayer is a sure sign of pride. Pray humbly, in perfect simplicity, seeking salvation only through forgiveness, & having faith that God will extend to you His mercy - as He did to the publican.
A great effort and much toil are needed in prayer before we can reach a state in which our mind is no longer troubled, and so attain the inward heaven of the heart where Christ dwells. As St. Paul says, 'Do you not realize that Christ dwells within you, unless you are worthless?' (cf. 2 Cor. 13:5).
If someone should ask: how am I to pray?, the answer is very simple: fear God. Experience of the fear of God arouses attention and consciousness in the heart and forces it to stand with devotion before God.
Go, sell all that belongs to you and give it to the poor and taking up the cross, deny yourself; in this way you will be able to pray without distraction.
To pray with self-constraint is in our power, whereas to pray with compunction depends upon God. We must pray with what prayer we can, and for our self-constraint God will give us compunction also in due time, when this is pleasing to Him.
How can one avoid distractions in prayer? If one abides in the presence of God. Indeed, when in the presence of one's judge and one's master, and speaking with him, one does not let one's eyes wander elsewhere. How much more should the one who approaches the Lord never turn away the eye of his heart, but fix it on Him who searches the reins and the heart.
Unless humility and love, simplicity and goodness regulate our prayer, this prayer - or, rather, this pretence of prayer - cannot profit us at all. And this applies not only to prayer, but to every labor and hardship undertaken for the sake of virtue.