A couple options.I never try it and to be sincere Im not completely sure how to fish the fv from the mains and input it safely into a 5V IC

Size R1 for a current high enough for the zener diode to regulate. The Schottky takes advantage of the fact that VCC can usually be exceeded slightly.
The reverse breakdown voltage for D1 needs to be higher if you're going to use line voltage. It's safer to use the secondary from a step down transformer.