Keeping power to arduino after mains shutdown
Step back and think of the true requirements.  You want the lamp to come on softly when you turn it on, and go off softly when you turn it off.  Don't complicate things by dictating where in all this power must be switched.

You have a microcontroller, so the on and off signals can be inputs to it instead of physically interrupting power.  The micro can then decide what to do about it and eventually switch off the power or go into sleep mode such that the power draw is so low as to be irrelevant.  A modern micro in sleep mode with the right power supply can draw far less current than the average clock, for example.

A arduino is a lot of fancy stuff and layers of abstraction wrapped around a microcontroller dumbed down for the masses.  Whether that can go to very low power I don't know, but a bare micro certainly can.  If not, you can use a micro directly (it's really not that hard, just seems intimidating at first, which is what the arduino caters to), or maybe have the arduino physically turn off power when it is done with the dimming via a relay or something.

The on/off button would force the relay on with the micro having the ability to keep it on thereafter.  On power up, the micro knows the lamp is being turned on.  It drives the enable to keep the relay on after the on/off button is released, then goes thru the soft start sequence.  When the button is detected while on, the micro goes thru the soft off sequence, then stops forcing the relay on, which will completely cut power.