It is indeed a difficult labour. It comes partly by applying a mental control, but for this the mental will must be purified by the Buddhi turned towards and inwards in seeking the Divine. Swadhyaya of uplifting spiritual books helps purify the Intelligence which in turn can better control the vital.
One can also refine the vital through art, music, painting, poetry and make it disciplined through sports and methodical physical exercises.
But this is not enough. The final victory comes only when the mind and thought, the awakened Intelligence is absorbed more and more in the Divine. Here the practice of calling God’s Name, meditation upon His Presence and surrendering oneself to God brings the final touch.