You need to include your child's age in your questions.
I don't know how to make you remember what you "know how to do." Maybe remove yourself from the situation and calm down for a few minutes before talking to him?
In my somewhat vast experience with kids of all ages, I have come to the conclusion that Less (talking) is More, especially with boys. This may go against your grain, being a psychologist, but boys really should not be forced to discuss themselves and their feelings ad nauseam.
Focus on a behavioral approach, where you simply tell him, "I can't hear you when you whine," and then don't respond till he stops whining, rather than making him analyze why he whines, trying to make him understand why whining is unpleasant and getting him to acknowledge why he shouldn't do it, etc. etc. etc., as psychologists tend to do.
Especially if your child is anxious, over-discussing his behavior will heighten his anxiety. Just keep it light and simple.
Light, and simple. He doesn't need to feel bad about himself and analyze himself, he just needs to adjust his behavior. Say, "Mommy can't hear whining." Or, if he's older, "Mom can't hear whining." And then don't respond to him until he says it in a normal voice.
Light and simple. And p.s. humor is really useful in parenting, so be humorous whenever possible.