So i will directly to the problem. I am not getting how, when we Wick rotate, the EM action should go to (the correct answer)
$$ S_E = \int -d^4 x\frac{1}{4} F_{\mu \nu} F^{\mu \nu} \underbrace{\rightarrow}_{Wick} S_M = \frac{1}{4} \int d^4 x F_{\mu \nu} F^{\mu \nu}$$
So that $S_E = -S_M$
But mine obtained is not exactly this! See, let $x^0 = -it$, so
$$dx^0 = -i dt \\ F_{i j}F^{ij} = F_{i j}F^{ij} \\ F_{i 0} F^{i 0} = F_{i j}F^{ij} \\ F_{0 0 } F^{0 0} = F_{0 0}F^{0 0 }$$
Where i used the fact that $A_{0} \rightarrow i A_0, A^0 \rightarrow -i A^0$.
So the action transforms to
$$S_E = -\frac{1}{4}\int d^4 xF_{\mu \nu} F^{\mu \nu} \underbrace{\rightarrow}_{Wick} S_M = \frac{i}{4} \int d^4 x F_{\mu \nu} F^{\mu \nu}$$
That is,
$S_E = -i S_M$
As we can see, the correct answer (the first equation) is not exactly equal to mine answer. In fact, the only difference is the $i$. The problem is that i don't know where i made a mistake, to be honest.
I have looked for any source involving Wick transformin the electromagnetic Lagrangian, but it seems that it is not a wwidely used tool, so i couldn't find out where i am wrong.