Hi,
It sounds like all you want to do is detect the "voltage" not the power. The voltage to the uC chip.
If so, then your description sounds strange because normally you would have a filtered and regulated power source to power the uC chip with, and that would not go to zero just because the line frequency happens to go through zero every 1/2 cycle.
If you do it that way however, then you need to use another rectifier and filter cap to filter the power to the chip and then measure that with the opto coupler. That will tell you for sure if the power is lost to the chip. To filter it digitally, set a timer to time the amount of time it is seeing an 'off' condition. If it stays 'off' for more than say 50ms without coming back 'on' then it is off for good. If it comes back on within that time frame, then start the timer counter over again.