Thanks, folks, for your considered opinions.
I think I was wrong to have shouted swear words, but not wrong to have shouted. When I think I'm in danger, I'm going to say something about it.
As I gain more experience in cycle commuting, (about 5 years now) I do get more resigned to the dreadful driving I see. But, because I have more experience, I usually see it coming a mile off (ie there's a car within 100 yards of me!!) and I take avoiding action.
What I've noticed, too, is that if I cycle my regular route, at my regular time, motorists are (even if subconsciously) familiar with the idea that I'm there: I've sort of got them trained to be a bit more patient and courteous. Maybe my problem last week that I was an hour early .. on my way to the dentist!!