Praying the Rosary is not "vain repetition" because you're not just repeating words, you're meditating on the mysteries of each bead. Here's an old post of mine which may help explain it better:
The Rosary is supposed to be a
meditative prayer---this means it comes more from the head than from the heart, as opposed to something like petitional prayer, which comes more from the heart than from the head.

You're not even supposed to be paying attention to the Hail Marys you recite---you're supposed to be paying attention to the mystery you're meditating upon. All that the recitation of the prayer does is to keep your mind focused and to establish a rhythm---sort of like repeating a mantra over and over in some Eastern religions.
The way I keep focused is to concentrate on one aspect of the mystery in question for each bead, keeping that in my mind as I recite the Hail Mary. For example, let's say that we're doing the Fourth Sorrowful Mystery, Jesus Carries the Cross; ten beads, ten Hail Marys, ten pictures to focus on:
1. Jesus was shoved into a carpenter's shop and a heavy, rough-hewn pine beam was thrown across His shoulders and lashed to His arms with ropes. The smell of the fresh wood shavings gave him a pang, thinking of the happy days He had spent as a child in Joseph's carpenter shop.
2. The soldiers shoved Jesus into the street, where He fell and skinned one knee on the rough paving stones. He struggled to His feet and staggered forward.
3. The streets were lined with people screaming for His death, spitting on Him, mocking Him. Also in the crowd were those who loved Him, who wept with horror and sorrow as He passed by.
4. Weak from carrying the crossbeam, Jesus fell to both knees. A woman came out of the crowd with a cloth and mercifully wiped the sweat and blood from Jesus' face.
5. As the procession turned a corner, Jesus came face-to-face with His mother. Mary's heart twisted within her when she saw what they had done to Him, and she began to weep unconsolably.
6. A group of women stood nearby, weeping as Jesus passed. Gasping under the weight of the crossbeam, Jesus said, "Daughters of Jerusalem, do not weep for Me; weep rather for yourselves, and for your children."
7. Jesus fell again, this time full-length upon His chest. He tried to rise and could not, even though the soldiers kicked Him and cursed Him.
8. One of the soldiers yanked Jesus to His feet by His hair, while another yanked a man out of the crowd and forced him to help Jesus carry the crossbeam; this man's name was Simon of Cyrene, the father of Alexander and Rufus.
9. At length, the place of execution was reached; this was a garbage dump outside the city wall of Jerusalem. This place was called in the Hebrew tongue "Golgotha", and in the Latin tongue "Calvarium", which means "The Place of the Skull".
10. Jesus was tripped by the soldiers and thrown flat on His back; the wind was knocked out of Him and He gasped for air. As He struggled to breathe, two of the soldiers approached Him on either side, bearing heavy iron hammers and long, sharp, rusty iron spikes.
And so on. It takes a while to go through five decades this way, but it really helps to keep you focused.