The Rebbe's advice for people who find it hard to concentrate when they pray:
Don't fight the thoughts. Distracting thoughts during prayer are a tactic of the yetzer hara; dismiss them at once and turn your mind back to the words, rather than arguing with them (IK 2345, 5400, 4374).
Pray from a siddur and look at the words. Keep the siddur open and look at the actual letters; this anchors the mind (IK 1153, 2223, 2875, 3513, 4663, 8357). Say the words once, with attention, rather than repeating them (IK 10521).
Prepare. Give tzedakah before praying and review a passage of Tanya beforehand (IK 6259). Think about the meaning of the words and about what one learned in Chassidus (IK 5702). Keeping in mind that G-d guides every detail of one's life brings clarity and joy (IK 4960).
The foundation is Torah and holiness. Concentration in prayer grows out of Torah study, especially Chassidus, and careful observance of mitzvos (IK 4047, 4510, 4543, 5653). Guarding one's personal holiness makes a real difference (IK 2875, 5702). Avoiding idle talk helps (IK 3006).
When prayer feels dry. For a feeling of numbness in prayer and study, learn specific Chassidic discourses on the subject and seek guidance from a mashpia (IK 2246), who can also advise which kind of contemplation suits you (IK 6844). Persist; add Tehillim and make sure one's tefillin and mezuzos are kosher (IK 6323).
Don't give up on the minyan. Distractions in shul are not a reason to stop praying with the congregation (IK 2939).
Halachic questions about kavanah should be asked directly of a Rav, not decided from hearsay (IK 2588).
See also: Bitachon – Worry, fear and anxiety (troubling thoughts in general); Prayer – Preparing for prayer and davening at length.