Does the Breit–Wigner formula indicate "violation" of energy conservation? In the quantum mechanical derivation of Breit–Wigner formula, for example, in the particle physics book of Martin & Shaw, we assume if the resonance particle $X$ is in an initial energy state with energy $E_0$ in its rest frame, it can decay into a state with energy $E_f$ not being equal to $E_0$. 
This seems strange to me. 
For examplem In the $Z$ boson decay we have$$ Z \rightarrow l^+ l^-$$Shouldn't we always have $E(l^{+})+E(l^{-})=M_{Z}$ in the rest frame of $Z$? If so why can we have a distribution as a function of the invariant mass of the decay products?
ps: I fully understand the derivation of Breit–Wigner formula, it's this "violation" of energy conservation that I don't understand.
This is the process in the book. How does one know if $X^{-}$ is off-shell?
The word off-shell is again confusing, because as far as I know it's a mathematical way of calculation and not real particle. 
What's the relation between off-shell particles and unstable particles?


 A: 
For examplem In the $Z$ boson decay we have$$ Z \rightarrow l^+ l^-$$Shouldn't we always have $E(l^{+})+E(l^{-})=M_{Z}$ in the rest frame of $Z$? If so why can we have a distribution as a function of the invariant mass of the decay products?

There is an intrinsic width in all resonances, i.e. in particles that decay, they do not have a fixed mass and the Breit Wigner gives a good estimate of this width. As in all quantum mechanical calculations the computation gives the probability of finding the invariant mass of the decay particles at that value of the energy. Over all energy and momentum conservation are guaranteed by the Lorenz invariance built in the calculations, whether simple ones or full QFT ones.
In your example above the Z is not long lived enough to be a "real" particle, it is always virtual and the balance of energy and momentum is taken up by the interaction that produced it. If it is electron+positron as in LEP, one can run the experiment changing the energy of the beams and thus see the width of the Z. See the report here . It is a mathematical continuation of the width of spectral lines, it can be related to the Heisenberg Uncertainty Principle . Basically it is due to the fact that at the quantum level one only measures probabilities, i.e. accumulated distributions. Each event is conserving energy and momentum, in the theory by construction of the theory to be Lorenz invariant. The theory fits the data very well.
In the recent measurement of the decays of the Higgs, the theoretically calculated width is much less than the measurement error width, sophisticated methods need to be used . The HEP community  expects to go to a lepton collider in order to get enough accuracy for testing the partial decay widths.

What's the relation between off-shell particles and unstable particles? 

It depends on whether we can assume that the unstable particle can exist in space time long enough for our measurement apparatus to be able to measure it. The muon for example lives long enough to act like a classical particle, and any quantum mechanical calculation,taking as input particles the ones in the reaction that produced it, will always give an extremely small width for the mass Breit Wigner, unmeasurable.
One can safely write down $μ+p$ and treat the muon as a real particle in the diagram calculation. This is not true for the Z or other particles in the standard model . They appear as internal lines in the Feynman diagram calculations, just carrying the quantum numbers, their mass in the propagator.
What one should keep in mind is that energy and momentum conservation are built in the mathematics of the theory by making sure it is Lorenz invariant.
