About electromagnetic work in first principle of thermodynamics Reading L. E. Reichl, A Modern Course in Statistical Physics, first principle of thermodynamics is stated as
$$dU = \delta Q − \delta W +
\sum_{j=1}^{v}
μ_j dN_j$$
with
$$\delta W = P dV − J dL − σ dA − \mathbf{E} ⋅ d\mathbf{P} − \mathbf{H} ⋅ d\mathbf{M} − \phi de$$
Where $P$ is the pressure, $V$ volume, $J$ tension, $L$ length, $\sigma$ surface tension, $A$ area, $\mathbf{E}$ electric field, $\mathbf{P}$ electric
polarization, $\mathbf{H}$ magnetizing field, $\mathbf{M}$ magnetization, $\phi$ electric potential and $e$ is the charge.

*

*As spotted out in the answer by @hyportnex, there's a substantial incoherence regarding global/local terms in this formula, to this end please consider what is meant here for $\mathbf{P}$ as what in electromagnetics would be referred to as $\mathbf{P}\,dV$ where (this latter) $\mathbf{P}$ is the electric dipole moment per unit volume. Same reasoning applies to the use of $\mathbf{M}$ in place of $\mathbf{M}\,dV$, where (this latter) $\mathbf{M}$ is the magnetic dipole moment per unit volume.

But from Poynting's theorem (see D.J. Griffiths, Introduction to electrodynamics, p357-358 for a proof) we know that
$$\frac{dW_{el}}{dt}=-\int_{V}\frac{1}{2}\frac{\partial}{\partial t}\bigg{(}\epsilon_0\,E^2+\frac{1}{\mu_0}B^2\bigg{)}dV-\int_{\partial V}(\mathbf{E}\times\mathbf{B})\cdot d\mathbf{A}$$
Where $W_{el}$ is the work done on charges done by electromagnetic force, $\mathbf{B}$ is the magnetic field.
Is it possible to derive, from this last espression, the electromagnetic terms in $\delta W$?

*

*I'm aware that not all Poynting's vector terms may fell into $\delta W$, since a part of them may be enclosed in $dU$ as potential, if this is the case, may this division be done explicitely in the answer, thanks

 A: The Poynting formula you have is for vacuum. For ponderable matter you can only derive the result for $\delta W$ if in the volume integral you start with 
$\mathbf{E} \cdot \frac{\partial \mathbf{D}}{\partial t}+\mathbf{H} \cdot \frac{\partial \mathbf{B}}{\partial t}$.  
Assume now that you integrate for all space and then you can ignore the surface integral over $\partial V$ containing the radiation term. Next multiply both sides with $\delta t$, so per unit volume the EM energy content is $\delta \tilde w_{em} = \mathbf{E} \cdot \delta \mathbf{D}+\mathbf{H} \cdot \delta \mathbf{B}$.  This is energy density. 
Introduce the constitutive relationships: $\mathbf {D} = \epsilon_0 \mathbf {E} + \mathbf {P}$ and $\mathbf {B} = \mu_0 (\mathbf {H} + \mathbf {M})$, an dyou can write for the energy density
$$\delta \tilde w_{em} = \epsilon_0 \mathbf{E} \cdot \delta \mathbf{E}+\mathbf{E} \cdot \delta \mathbf{P}+\mu_0 \mathbf{H} \cdot \delta \mathbf{H}+\mu_0\mathbf{H} \cdot \delta \mathbf{M}\\
=\frac{1}{2}\epsilon_0 \delta |\mathbf{E}|^2+\mathbf{E} \cdot \delta \mathbf{P}+\frac{1}{2}\mu_0 \delta |\mathbf{H}|^2+\mu_0\mathbf{H} \cdot \delta \mathbf{M}$$
This can be rewritten as follows:
$$\delta \tilde w_{mat}=\mathbf{E} \cdot \delta \mathbf{P}+\mu_0\mathbf{H} \cdot \delta \mathbf{M}$$
where $\delta \tilde w_{mat} = \delta \big(\tilde w_{em} - \frac{1}{2}\epsilon_0 \delta |\mathbf{E}|^2-\frac{1}{2}\mu_0 \delta |\mathbf{H}|^2\big)$ represents the energy density without the, for lack of better term, "vacuum fields" $\mathbf{H}$ and $\mathbf{E}$ that create, so to speak, the material polarization fields $\mathbf{M}$ and $\mathbf{P}$.
Now to get back to your original equation, that one cannot be proven for it mixes energy densities with total energies, for example the terms $pdV$ or $\phi de$ represent total work (or energy) for the whole volume while a term like $EdP$ is density per unit volume. Anyhow, you may say that to create the polarizations $\mathbf{M}$ and $\mathbf{P}$ in the fields $\mathbf{H}$ and $\mathbf{E}$ you must expend $\delta \tilde w_{mat}$ amount of work.
