1) You need two diodes.
View attachment 103310
2) Read about your Arduino
ANALOG inputs and see what the maximum input voltage is. It might be from -0.6 volts to +5.6 or maybe 4.0V. So the bottom diode connects to ground but the top diode connects to +3.3 or +5.0 depending to the answer. (5V in your case)
3) R1/R2 I think you want 0 to 500V to be 0 to 5V.
That is 100:1 divider.
In round numbers: If R1=500k ohms and R2=5k then you would have 101:1. (close)
Common numbers: 470K and 4.7K R1 will need to be 1 watt. Or 1M ohm and 10k 1/2 watt.
Many small resistors are only good for 200 to 300 volts. You can series resistors. example 220k + 220k = 440k that can with stand more voltage and wattage. I would use 1% resistors but you can use more standard 5% if you can live with that.
4) The Arduino is using the power supply as reference. So the 5V of off by 3% all you measurements will also be off a little. If you are using 5% resistors then there is more error. You can measure the voltage with a good meter and then teach your computer about the error. Example: If you really have 220V but because of all the errors the computer reads 230V (about 5% off) then include a "error number" in software. (read the voltage then multiple by 0.95 to get a good measurement)