You want to show that the first and second equations are consistent (if $\mathbf{x}=\mathbf{0}$). In particular, you want to show that $\mathbf{p}=\mathbf{p_0}$.
Begin with the second equation, which is the definition of the dipole moment $\mathbf{p}$.
Next use the multipole expansion of the electric potential:
$$V(\mathbf{x}) = \frac{1}{4\pi\epsilon_0}\left(
\frac{q}{|\mathbf{x}|}+\frac{\mathbf{p}\cdot\mathbf{x}}{|\mathbf{x}|^3}+...\right)$$
For a dipole, all the terms are zero except the second.
Using Poisson's equation:
$$\nabla^2 \, V(\mathbf{x}) \left(= \nabla^2 \frac{\mathbf{p} \cdot \mathbf{x}}{4\pi\epsilon_0|\mathbf{x}|^3}\right) = -\frac{\rho(\mathbf{x})}{\epsilon_0}$$
it is possible to calculate the Laplacian and rearrange the resulting equation to show (see, for example, What is the charge density of a pure electric dipole?) that:
$$\rho(\mathbf{x}) = -\mathbf{p} \cdot \nabla\delta^{(3)}(\mathbf{x})$$
So you have that $\mathbf{p} = \mathbf{p_0}$. This is a trivial result because $\mathbf{p}$ was used to derive the charge density, but the derivation makes it clear that the two expressions you have are consistent.
An alternative approach is to set $\mathbf{p_0} = \mathbf{p}$ and
$\mathbf{x} = \mathbf{0}$ in the first equation, then substitute into the second. I am quite unsure about the mathematics here, but since nobody else has provided an answer I will try:
$$ \mathbf{p} = \int_\mathcal{V} \mathbf{x} \left(-\mathbf{p} \cdot \nabla \delta^{(3)} (\mathbf{x})\right) \mathrm{d}^3x
= \int_\mathcal{V} \left(-\mathbf{p} \cdot \nabla \delta^{(3)} (\mathbf{x})\right) \mathbf{x} \,\,\mathrm{d}^3x$$
Using the result that $\nabla\delta^{(3)} = -\delta^{(3)}\nabla$:
$$ \mathbf{p} = \int_\mathcal{V} \left( \mathbf{p} \cdot \delta^{(3)} (\mathbf{x}) \nabla \right) \mathbf{x} \,\,\mathrm{d}^3x \\ =
\int_\mathcal{V} \mathbf{p} \cdot \delta^{(3)}(\mathbf{x})\nabla x \,\hat{\mathbf{i}} \, + \mathbf{p} \cdot \delta^{(3)}(\mathbf{x}) \nabla y \,\hat{\mathbf{j}} \, + \mathbf{p} \cdot \delta^{(3)}(\mathbf{x}) \nabla z \,\hat{\mathbf{k}} \, \,\,\mathrm{d}^3x
\\= \int_\mathcal{V} \left(\mathbf{p} \cdot \delta^{(3)}(\mathbf{x}) \, \hat{\mathbf{i}}\right)\hat{\mathbf{i}} \, + \left( \mathbf{p} \cdot \delta^{(3)}(\mathbf{x}) \, \hat{\mathbf{j}} \right) \hat{\mathbf{j}} \, + \left( \mathbf{p} \cdot \delta^{(3)}(\mathbf{x}) \,\hat{\mathbf{k}} \right)\hat{\mathbf{k}} \, \,\,\mathrm{d}^3x \\
\\ = \int_\mathcal{V}\delta^{(3)}(\mathbf{x}) \left(p_x \hat{\mathbf{i}} + p_y \hat{\mathbf{j}}+ p_z\hat{\mathbf{k}}\right) \mathrm{d}^3x =
\mathbf{p}$$.