I am trying to show that in a given category $\mathcal{C}$ which has pushouts, we can show that any morphism $f:X\rightarrow Y$ is an equalizer of some pair of morphisms.
My solution to this is by taking the cokernel pair; the pair of morphisms $p_1,p_2: Y\rightarrow Y\cup_{f,f} Y$, where $Y\cup_{f,f} Y$ is the pushout of $Y$ along $f$. Certainly this equalizes $p_1,p_2$ by the fact that the $p_1$ and $p_2$ are exactly morphisms such that this occurs. However, showing that this is universal is where I cannot seem to make any progress.
My initial attempts try to use the following: let $(Z,g:Z\rightarrow Y)$ equalize $p_1$ and $p_2$. Then we can form the pushout $Y\cup_{g,g} Y$, which because of the universal property of the pushout means that there is a morphism $u:Y\cup_{g,g} Y\rightarrow Y\cup_{f,f} Y$. The idea was to use this to produce a morphism from $Z$ to $X$. However, it doesn't appear that this is possible using this methodology, though I still feel that using the universal property of the pushout is central here.
Is there a way to produce such a morphism so that $(Y,f)$ equalizes $p_1$ and $p_2$ universally? Or does it depend upon other factors? In particular, if $f$ is a monomorphism, does this suffice?