Be patient with yourself. Swearing is habit that you've probably picked up over a number of years and which you've come to rely on as part of your daily speech. Like any ingrained habit, it will be impossible to stop doing it overnight. Training yourself to stop swearing is a process, you'll have good days and bad days, but it's important to keep at it. Remind yourself why you're doing it and visualize how good you'll feel when you've finally kicked the habit.