You are on the right track by trying to set forth the best example possible. It's not easy, though, and we have found that sometimes we just have to tell our kids that there are things that grown-ups can say sometimes that kids should never say! We just explain that it is not the best language and we'll try to do better next time so we don't teach them bad habits, but that adults can speak however they want. Kids can NOT speak however they want.
We have also had to work with our kids about appropriate times for slightly inappropriate language. For instance, at home when we are wrestling and being silly, I might yell out, "Hey!! Come here so I can pinch that little butt!!" Squeels of delight and chasing ensue so it's fun and silly and crazy and all right. However, saying "butt" at school or around other adults or to other kids is usually not the way we choose for our kids to talk. So they have learned that some language is not necessarily bad, just not appropriate in certain situations.
I hope this all makes sense. In the meantime, kids should never hear cuss words from their parent's mouths. If it happens, then as soon as you are calm enough, take time to apologize and promise to try to do better. If they see that those kids of words are NEVER appropriate, not even for an adult who is angry, they will learn not to use them as well.
I think your new mantra with your son should be, "That is not very nice language coming from such a handsome (smart/educated/sweet/silly/funny/fill in the adjective of your choice) young man. Let's use different words from now on, please."
We all make mistakes and if we are honest with our kids, they can learn from them as well. Good luck!