Your dog has a variety of urges. When you’re dealing with stronger urges, such as his desire to mate, you need to be a little more hands-on.
Expose your dog to the stimulus that causes the urge you wish to calm. Most of your dog’s urges are reactions to environmental stimuli; for example, the sound of the doorbell causes the dog to have an urge to bark, so by regularly ringing the doorbell, he’ll become used to the sound.
Repeat the exposure to the stimulus. Sufficient exposure typically results in desensitization over time. However, for sexually driven urges, the urge is too strong to calm with desensitization, so you’ll need to use distraction.
Ignore your dog while he is exposed to the stimulus. For example, if your dog has the urge to bark when the doorbell rings and your typical reaction is to shout at him to stop, he hears your shouting and interprets it as distress; you’re compounding the problem. By acting normally, your dog will learn that the doorbell is nothing to be alarmed about.
For a dog that can’t resist his urges, distraction enables you to focus his mind elsewhere. For example, if your dog is a persistent beggar when food is around, throw him a toy to play with while you’re eating. If he has urges to jump the fence, distraction is an effective technique. If you are attempting to deal with sexual urges, leash the dog. That way you can distract and control him at the same time by walking him away when he starts acting on his urges. For example, if he attempts to mount a female dog in season, gently guide him away with the leash and give a time out.
Give verbal praise. Once your dog is showing signs of desensitization to the stimulus that causes his urges, you can move on to negative punishment. This technique is very similar to the parenting technique of removing privileges. Rather than scolding the dog for doing something you don’t want him to do, you can introduce a positive stimulus which you can then take away.
Remove the praise if he reacts to his urge. Eventually, he’ll learn that the positive feeling of being praised disappears when he reacts. You can combine negative punishment with leash distraction if you’re tackling particularly strong urges.