Thank you all for your replies, I have learned a lot already.
First of all, I have gone out and bought myself an oscilloscope. With that I was able to determine that
the PWM frequency is 500 Hz (2ms period). The shape of it seems like a fairly good square wave although there is a bit of jitter after each downward spike.
To those suggesting that I change the PWM frequency, I'm afraid it can't be set arbitrarily. From studying the Marlin firmware source code it appears that the timers for the PWM frequency are shared by other PWM-controlled components such as the heaters and the stepper motors. The firmware does have a FAST_PWM_FAN setting (yes/no) which notes:
Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino
The heating is probably why the setting is disabled by default. Judging by the source code the FAST_PWM_FAN option results in the PWM frequency being calculated as follows: CPU_FREQ / 256 / 8. Since the CPU on my board runs at 16 MHz that would result in a PWM frequency of 7,812.5 Hz, which is still well within the audible range. I've also read that this setting reduces the control resolution because scaling modifiers need to be used internally. All in all it does not look like a very good solution either.
This seems to be a language problem. What you described as "electrical" noise is apparently acoustic noise (i.e. audible noise, sound waves).
This misunderstanding would have misdirected the people who first read your post.
Indeed, my apologies for the misunderstanding. I have edited it in my original post.
The first thing to check (you didn't say if you did this) is to run the fan on a variable DC supply and see if it is any quieter, if not, then it is just a noisy fan (wind noise or commutation). Note that you also need to check that the fan can reliably start as the DC supply is ramped up to minimum rated voltage.
I have indeed done that. On a DC lab supply I could control the speed by adjusting the voltage without any whining noise. The fan starts spinning at around 1.8V. I tested its ability to restart several times at 2V and it seemed to have no problems with that (even though the manufacturer specifies a minimum of 4.5V).
You really need to know the PWM frequency to effectively understand and fix the problem. What sort of noise is the fan making? If it is a wining noise then the PWM frequency is in the low kHz range, if you are not able to change it, then a small RC or LC filter may solve the problem.
I've linked a fix that I did for a GW Instek Bench PSU fan, this presented as an apparent 'rattling bearing' sound. In this case, the PWM frequency was very low (65Hz) meaning that the internal supply capacitor in the fan was completely unable to cope. I introduced a simple RC filter that completely solved the problem...
https://www.eevblog.com/forum/repair/cured-my-gps2032-psu-rattle/msg931131/#msg931131
Now I know it's 500 Hz, which seems correct for what I'm hearing. I'm convinced the noise is from the PWM frequency.
May I ask why you opted for an RC filter over LC?