Upvote:0
Lust is the number one defilement that will likely destroy an otherwise good practice. There is a practice that specifically targets lust known as The Thirty-two Parts of the Body (Dvattimsakara). One contemplates these 32 parts of the body: head-hairs, body-hairs, nails, teeth, skin, flesh, sinews, bones, marrow, kidneys, heart, liver, pleura, spleen, lungs, intestines, intestinal tract, stomach, feces, bile, phlegm, pus, blood, sweat, fat, tears, grease, saliva, nasal mucus, synovium (oil lubricating the joints), urine, and the brain. This will help free the mind of the illusion that there is something beautiful about the body. There is nothing ultimately beautiful or ugly about the body. One might turn lust into repulsion by contemplation of the body parts in a state of decay or by viewing real autopsy photos. This is a common practice for monks because they must keep the precept to be pure of any sexual activity and if they can't tame the lust they often have to go back to lay life.
Upvote:1
When you have lust recognise you have lust. Mere having lust is not failing in meditation but not recognising it is a failure.
To overcome the lust (one of the 5 hindrances) the main issue is that you have not taming you senses. You cannot avoid contact so each time some lustful thought arise in your mind look at the sensation it creates in the body. Look at this at mere thought and look at the impermanence of the sensations fantasizing or actual contact brings.
Following links might be off some help: