I always wave to courteous drivers when coming to an intersection unless it is on a descent that I need to manage with both hands. For drivers giving me ample space while overtaking, I do not wave unless they are passing slowly and can directly see me (i.e., not via a mirror) when they are alongside. Otherwise, a raised arm in the rear-view mirror may be mistaken for a complaint / insult / retort.