The Root of the Behavior
Dogs who hit you with their nose in reaction to something you are doing are trying to communicate as well. Some canines will believe they are assisting their human companion by eliciting any reaction. This is most commonly observed if the human companion sits calmly or sleeps when they do this. They may believe the person to be in danger and some dogs will attempt to elicit some reaction to ensure you are alive and well.
Essentially it comes down to being a form of communication. When you get sad or angry and your dog comes up to you and touches you with their nose it is likely because it has had a positive reaction from you in the past. Maybe it made you smile or maybe it made you calm down. This may not be a behavior you want to get rid of. Understanding what your dog is trying to communicate and having the appropriate reaction will help curb annoying and demanding behaviors while still encouraging your dog to communicate with you freely. This can be pretty important to ensuring a solid relationship but if you don't like being hit with a cold nose it doesn't have to be the way you communicate.
Encouraging the Behavior
If you play fetch to wear them out when they annoy you, they will simply annoy you every time you want to play fetch. Encouraging behaviors like these can be quite simple but hiring a professional trainer may be your most effective method. A professional trainer will be able to identify why they have these overbearing behaviors and the right steps for you and your family to take in an effort to correct them.