When do we say "complain about" and when "complain of"? Is the former used in general to say we're annoyed or not satisfied about something, and the latter when we are speaking about ilnesses?
Complain of means to state that you are suffering from a certain problem, and possibly to describe it. It's most commonly used in medicine, but isn't limited to medicine. When you go to a doctor and complain of an illness, this means that you tell the doctor that you have the illness and possibly that you describe it. The object of "of" must be a problem of some kind: you could complain of a headache, an unreliable web server, an unfaithful spouse, mistreatment by police, etc.
Complain about means to express your dissatisfaction with the object of "about". For example, you might complain about your spouse. Having a spouse is not itself a problem, so it doesn't make sense to complain "of" a spouse. When you complain about your spouse, you say bad things about your spouse. "You should see my husband! He sits around all day drinking beer and watching football on TV, he never does any housework, he has no ambition, he doesn't appreciate music, …" If you return a defective toaster to the store, you might complain about the toaster: "It burns everything even on the lightest setting." But it doesn't make sense to complain "of" the toaster, because the toaster is not a problem. You might complain of burnt toast, though.
Complain of also means to report a troublesome person to an authority. "The plaintiff complained of his neighbor."
Complain about has a slightly negative connotation. It suggests whining, criticizing, nagging, or venting negative emotions. Complain of does not have that connotation. It suggests just factually noting and describing the problem. So, if you were to talk at length about how annoying your headache is and how much trouble it's caused you, that would be complaining about the headache. If you just state that you have a headache, where the pain is, and when it started, that would be more in line with complaining of a headache.
Complain of suggests that you are talking to someone who is going to fix it or help you with the problem (like a doctor or a police officer). Complain about suggests that you're talking to someone who is responsible for the problem, like when you return the toaster to the store, or that you're talking to someone who can't or won't help with the problem, like when commiserating with friends about your spouse.
Sources: See senses 4b, 6, and 8 in the OED.
Complain of is much more formal than
For instance, when a doctor is taking notes on his patient, he may write something like:
The patient was complaining of a pain in her arm.
Complaining of headaches, the patient was very loud.
complain of something: to say that you feel ill/sick or are suffering from a pain
Essentially, if you are complaining of something, it will have to do with your well-being / health, it will have to do with YOURSELF ...it is a very selfish phrase (Check here in Collins' Example).
complain of something:
He was complaining of his leg hurting.
He was complaining about his leg hurting him
The use of about implies another subject. As you can see from the example above, the subject's leg is hurting him. In other words, the complaint is about the leg
He was complaining about the loud music
I was complaining about having no money
Joe complains every day about his breakfast.
Sheila had complained about the customer service for years.
In none of the above sentences can you replace