How to prepare before prayer

Mental prayer contains three parts: the preparation, the meditation, and the conclusion.
1. In the PREPARATION there are three acts: an act of faith, of the presence of God, and of adoration; 2, an act of humility and of sorrow for our sins, and, 3, a petition for light. They may be made in the following manner:
My God, I believe Thee present within me; I adore Thee with my whole soul.
Be careful to make this act with a lively faith, for a lively remembrance of the divine presence contributes greatly to remove distractions. Cardinal Caracciolo, Bishop of Aversa, used to say that when a person is distracted in meditation there is reason to think that he has not made a lively act of faith.

2. Lord, I should now be in hell in punishment of the offences I have offered to Thee. I am sorry for them from the bottom of my heart; have mercy on me.

3. Eternal Father, for the sake of Jesus and Mary, give me light in this meditation, that I may draw fruit from it.
We must, then, recommend ourselves to the Blessed Virgin by saying a Hail Mary, to St. Joseph, to our guardian angel, and to our holy patron. These acts, says St. Francis de Sales, ought to be made with fervor, but should be short, that we may pass immediately to the meditation.

II. On entering on the meditation we must take leave of all extraneous thoughts, saying with St. Bernard, "O my thoughts! wait here;" after prayer we shall speak on other matters. Be careful not to allow the mind to wander where it wishes; but should a distracting thought enter, we must not be disturbed, nor seek to banish it with a violent effort, but let us remove it calmly and return to God. Let us remember that the devil labors hard to disturb us in the time of meditation in order to make us abandon it. Let him, then, who omits mental prayer on account of distractions, be persuaded that he gives delight to the devil. It is impossible, says Cassian, that our minds should be free from all distractions during prayer. Let us, then, never give up meditation, however great our distractions may be. St. Francis de Sales says that if in mental prayer we should do nothing else than continually banish distractions and temptations, the meditation is well made. And before him St. Thomas taught that involuntary distractions do not take away the fruit of mental prayer. When we perceive that we are deliberately distracted, let us desist from the voluntary defect, and banish the distraction, but let us be careful not to discontinue our meditation.