Issue with bipolar to unipolar opamp circuit
If I were you I would use another method, I would use a small capacitance capacitor to drop the voltage rather than 1 MΩ. Then I'd center it in the middle of what I'm interested in, which is 2.5 V in this case. Then I buffer the signal so I don't mess with it and then I finish it off with another op-amp that undo what the leftmost capacitor did, integrator/deriving wise. 



Here's the link if you want to mess around with the circuit. 


The left signal is the voltage in the node between the noise and the 1 nF capacitor. 
The middle signal is the voltage in the node marked blue in the schematic.
The right signal is the output which is 180 phase shifted, can be solved in software Output = 5-Output; or by adding an inverting op-amp. 


The rightmost op-amp is an integrator, this means that if the input has any DC voltage at all, any what so ever, even the slightest nano volt, then they will accumulate and your output will start to drift. What you want is to not drift, and that is what the 1 MΩ resistor assists with. It will help your signal to remove any DC-value if they ever come into your system. Or if you put energy into the system and never take it out, say touch either connections with your fingers, then that will also give you an offset of your reading, and the 1 MΩ takes care of that. It removes drift.



If you want you can just feed the signal at the blue node straight into your MCU and integrate it in software, this way you get rid of the two op-amps, but on the software side you have to integrate and make sure you are sampling at at least 1 kHz if you want reasonably good quality on your reading. The higher the frequency the better the resolution (duh). You will only need 3 components.

Output+= V_at_blue_node - 2.5;


But this will drift, which can be solved by applying a "resistor" in software like this:

Output+= V_at_blue_node - 2.5;
Output = (Output-2.5)*0.99999+2.5;


Or simply 

Output = (Output-2.5)*0.99999+V_at_blue_node;




You might want to choose the amplitude of the output "ripple" from the 1 nF and the 2 10 kΩ network. 

Here's a formula for selecting R knowing the amplitude of the mains sine wave and the capacitance. 

\$R=\frac{2V_{ripple}}{V_{mains}2\pi fC}\$

So say you want a sine wave with an amplitude of 205 V to give you a sine wave with a 2 V amplitude. This way you will be able to see voltages that are 25% larger (~250 V => 500 V peak to peak). Let's also say you are using a 1 nF capacitor.  

\$R=\frac{2×2}{205×2\pi ×50×1×10^{-9}}=62109.246 \approx 62.1kΩ\$