We present a self-consistent theory of strongly nonlinear plasma wakefield (bubble or blowout regime of the wakefield) based on the energy conservation approach. Such wakefields are excited in plasmas by intense laser or particle beam drivers and are characterized by the expulsion of plasma electrons from the propagation axis of the driver. As a result, a spherical cavity devoid of electrons (called a "bubble") and surrounded by a thin sheath made of expelled electrons is formed behind the driver. In contrast to the previous theoretical model [W. Lu et al., Phys. Rev. Lett. 96, 165002 (2006)PRLTAO0031-900710.1103/PhysRevLett.96.165002], the presented theory satisfies the energy conservation law, does not require any external fitting parameters, and describes the bubble structure and the electromagnetic field it contains with much higher accuracy in a wide range of parameters. The obtained results are verified by 3D particle-in-cell simulations.