What will happen on regulator as battery gets depleted?
The dropout voltage for a 7805 is around 1.6-2V, typically, depending on current. If you want 5V out, you should give it around 7V at the end of battery life. If you consider end of battery life to be 1.0V per cell, then you need 7 batteries, not four. 

If you just connect 4 Alkaline AA cells to a 7805, the initial output voltage with a light load will be about 5V, but it will rapidly decrease. See this graph below of a typical Panasonic AA cell with around a 100mA load. 



The voltage out of the 7805 will drop below 4.5V typically in a few hours, wheras allowing the cells to discharge to 1V per cell will give you about 80 hours of operation. 

From the same datasheet, you can see the discharge characteristics at different currents and for different end-of-life cell voltages. 


If you use an LDO (Low Drop Out) regulator that has a dropout voltage of, say, 0.2V, then you need only give it 5.2V, so 5 batteries would do, allowing 1.04V per cell for end of life. 

Or you could use a buck-boost regulator to give you 5V regardless of input voltage (a bit complex), or a boost regulator and use 3 cells (assuming 3 cells hold enough energy).