EDIT: Additional question at the end
I am trying to illuminate how the "unphysical" gauge bosons $W^{1}_{\mu},W^{2}_{\mu},W^{3}_{\mu},B_{\mu}$ will be the "physical" $W^{\pm},Z_{\mu},A_{\mu}$ when diagonalizing the mass matrix. Notice that it is in Euclidean time, so we do not have to care about the Lorentz indices. Furthermore $\sigma(x)$ is the Higgs field and $v$ is the vacuum expectation value.
After the symmetry breaking $$ SU(2)_L\times U(1)_Y \rightarrow U(1), $$
and inserting the vacuum expecation value, I got the following Lagrangian (just the dynamical part):
$$
\frac{1}{2}D_{\mu}\phi^{\dagger}D_{\mu}\phi = \frac{1}{2}\partial_{\mu}\sigma \partial_{\mu} \sigma + \frac{(v+\sigma)^2}{8}(g^2W^{1}_{\mu}W^{1}_{\mu} + g^2W^{2}_{\mu}W^{2}_{\mu} + (gW^{3}_{\mu} - g'B_{\mu})(gW^{3}_{\mu} - g'B_{\mu})) .
$$
$W^{\pm}=W^{1}_{\mu}\pm W^{2}_{\mu}$ is clear, but retrieving $Z_{\mu}$ and $A_{\mu}$ not. I tryied the following, since the last part of the Lagrangian can be written like:
$$
(W^{3}_{\mu},B_{\mu}) \begin{pmatrix}g^2 & -gg'\\-gg'& g'^{2} \end{pmatrix} \begin{pmatrix}W^{3}_{\mu}\\B_{\mu} \end{pmatrix}
$$
The diagonlized matrix reads
$$
M_D=\begin{pmatrix}0 & 0\\0& g^2 +g'^{2} \end{pmatrix}
$$
and does not give the right linear combinations of $Z_{\mu}$ and $A_{\mu}$, which are given in my literature as
$$
A_{\mu} = \frac{g'W^{3}_{\mu} + g B_{\mu}}{\sqrt{g^2+g'^2}},\qquad Z_{\mu} = \frac{gW^{3}_{\mu} - g' B_{\mu}}{\sqrt{g^2+g'^2}}
$$
My question is now, how to get these combinations, it looks like I am close, but only close. And the other question where comes the normalization conditions for the field from?
Cheers!
EDIT:
I finally found the linear combinations, mass eigenstates, like they are in the literature, by inserting not only the diagonlized mass matrix $M_D$, but by inserting $M = PM_DP^{-1}$ As I was looking at the covariant derivative to find out how the fields couple to the Higgs doublet I was wondering how I could possibly turn the following matrix into mass eigenstates of the gauge fields:
$$ \frac{i}{2}\begin{pmatrix}gW^{3}_{\mu} + g'B_{\mu} & 0\\ 0& g W^{3}_{\mu} + g'B_{\mu}\end{pmatrix} $$
again, cheers!