Turn on/off ESP8266 by a transistor
As suggested in one of the comments, there is a simpler and more efficient way to do this using a DC-DC converter rather than a linear regulator.  Here's one way to do this:  







simulate this circuit &ndash; Schematic created using CircuitLab

This uses a Microchip MIC23050 high-efficiency buck regulator so you can power it directly from your 4 AA battery supply.  The EN input can be driven directly from a logic output.  The choice of the diode D1 is not critical -- we just need a small (~0.5V) voltage drop from the nominal +6V of the supply. 

Not only is this simpler and has fewer parts, but it's also pretty inexpensive - around US $1 for everything.