4.7/(1000+4.7) = 0.004678.. with 220v AC the voltage feeding into the ESP8266 is -220*1.414*0.004678 to +220*1.414*0.004678v. That is -1.455 to +1.455v.
As others have said, you also have no isolation of the mains power.
This means you are very likely to take both the ESP8266 and yourself out of the gene pool.
If you are trying to determine the fan speed then why not use a proximity detector and mount the circuit on the ceiling so you can detect the fan blades passing the detector?
David