delete the things that sound rubbish, start fresh with a new loop, keeping the parts that you liked, continuously smash your head against your keyboard until you finish the tune. For me, usually if I dont finish like the main skeleton and get my ideas out within and hour or so, the track will end up shite, but its always good to force a track to the end, it will be crap but finishing is the only way to progress, if that makes sense