Obtain an accurate DC value in an AC+DC signal
Your output looks fine to me.
There is always a period at start up of a filter where its output is off, and it converges to the correct output in a time period related to the cutoff frequency - a lower cutoff for a low pass filter means it will take longer to converge to the true value.  This explains the "changing" output of your filter.

Next, is the oscillation.  That, too, looks correct.  A filter doesn't remove everything out side of its passband, it merely reduces it.  Since you are using a simple filter, the reduction isn't very strong.  Your output has a much reduced 50Hz wave riding on the DC, which is about what you could expect from the given circuit and simulator settings (signal generator says -10V DC, 1 Volt AC at 50Hz.)

You will need a better filter to reduce the AC.  Some other folks here are more capable of giving you tips on that.

You will probably have to live with the period at the beginning where the filter is converging to the proper DC level.



I missed the bit about "millivolt accuracy."  Given the Arduino has a 10bit ADC, you will only get 1024 steps for voltages between 0 and 5 volts.  That's a tad less than 5 millivolt resolution (4.88mVolt.)  So, you aren't gong to get millivolt accuracy just using the ADC.

What you can do is to use a variant of the suggested moving average filter to improve the accuracy at the cost of time resolution.  What you would do is use a low pass filter to remove (reduce, really) components above say 1Hz, then average all the ADC values for one second.  You would get a value with more bits of accuracy, but only once per second.  The ratio between the time period for the average and the real sampling rate tells you how many (theoretical) bits of accuracy you can gain.  If you are sampling at 8000Hz, and average every two samples, you can gain one bit of accuracy but only have 4000 samples per second instead of 8000.

That will help with the DC, but not the AC.  I don't know what you can do there or if you also need millivolt accuracy there as well.



In response to comments:
I see you can do post processing in Matlab.  This makes a BIG difference.  Use a simple anti-aliasing filter appropriate to your sampling rate and expected signal.  Store the sampled data to SD, then process in Matlab.  

In Matlab, you can implement the resampling to improve the bit accuracy as mentioned above, as well as using better filters to remove the AC.  Since you are working offline, you can use a non-causal filter to remove the AC - this will take care of the convergence problem mentioned above.

Filtering out the DC so that you can process just the AC will also be simpler - non-causal filters will also help here.