Nice identity: the norm of the second fundamental form and scalar, Ricci, mean, Gauß curvatures together 
Let $M$ be a $3$-Riemannian manifold and $\Sigma$ an embedded surface in $M$.
Using the Gauß equation, I want to show the following identity on $\Sigma$:
$$R-2\mathrm{Ric}(\nu,\nu)-|A|^2=2K-H^2,$$
where $R$ is the scalar curvature, $\mathrm{Ric}$ is the Ricci tensor, $\nu$ is a unitary vector normal to $\Sigma$, $A$ is the second fundamental form, $K$ and $H$ are the Gauß and mean curvatures of $\Sigma$, respectively.
This appears for example at the beginning of the proof of Proposition 2, here.

Gauß equation: $\langle \overline{\boldsymbol{R}}(X,Y)Z,W\rangle=\langle \boldsymbol{R}(X,Y)Z,W\rangle-\langle A(Y,W),A(X,Z)\rangle+\langle A(X,W),A(Y,Z)\rangle$, where the bold letters $\overline{\boldsymbol{R}},\boldsymbol{R}$ indicates the curvature tensors of $M$ and $\Sigma$, respectively.

What I have tried:

*

*First of all, I was doubtful about the normal vector $\nu$. Since we don't
know if $\Sigma$ is orientable, it might be that a (unitary differentiable)
normal vector field does not exist on $\Sigma$. However, looking at the
definitions, we have (is this really right?) $R(\nu)=R(-\nu)$,
$\mathrm{Ric}(\nu,\nu)=\mathrm{Ric}(-\nu,-\nu)$, etc., in such a way that the
identity makes sense, regardless the (non)orientability of $\Sigma$.

*Then, with the definitions of $R$ and $\mathrm{Ric}(\nu,\nu)$, I tried to work on the term $R-2\mathrm{Ric}(\nu,\nu)$, getting an expression which does not seem to clarify very much...

*Then came the next doubt: what is the usual norm for $A$? There are many equivalent ones, right? Generally, this is not important when we talk about continuity, but in the present case, it seems important because we deal with an equation/identity.

I was not able to do much more...

Other useful definitions:
Given an orthonormal basis $\{x_1,x_2,x_3=\nu\}$ of $T_pM$, $p\in \Sigma$,
$$\mathrm{Ric}(\nu,\nu)=\frac{1}{2}\big(\langle \overline{\boldsymbol{R}}(\nu,x_1)\nu,x_1\rangle+\langle \overline{\boldsymbol{R}}(\nu,x_2)\nu,x_2\rangle\big)$$
$$R=\frac{1}{3}\sum_{j=1}^3\mathrm{Ric}(x_j,x_j)$$
$$A(X,Y)=\overline{\nabla}_{\overline{X}}\overline{Y}-\nabla_XY.$$
 A: Let's do calculation following your idea (some different notations).
$$\operatorname{Ric}(\nu,\nu)=\sum_{i=1}^3<\tilde{R}(e_i,e_3)e_3,e_i>=\sum_{i=1}^2<\tilde{R}(e_i,e_3)e_3,e_i>=\tilde{R}_{1331}+\tilde{R}_{2332}$$
and
$$S=\sum_{i,j}^3<\tilde{R}(e_i,e_j)e_j,e_i>=2\sum_{i<j}^3<\tilde{R}(e_i,e_j)e_j,e_i>=2\tilde{R}_{1221}+2\tilde{R}_{1331}+2\tilde{R}_{2332}.$$
Thus
\begin{eqnarray*}
S-2\operatorname{Ric}(\nu,\nu)&=&2\tilde{R}_{1221}\\&=&2<\tilde{R}(e_1,e_2)e_2,e_1>\\
&=& 2<R(e_1,e_2)e_2,e_1>-2h(e_1,e_1)h(e_2,e_2)+2h^2(e_1,e_2)\\
&=& 2K-2k_1k_2\\
&=& 2K+(k_1^2+k_2^2)-(k_1+k_2)^2\\
&=& 2K+|A|^2-H^2
\end{eqnarray*}
where we used the Gussian euqation in the third equation; in the fourth equation we choose $e_1,e_2$ to be the principal direction, i.e. for shape operator $Se_i=k_ie_i$; in the last equation I guess in your context the mean curvature is the sum of principal curvatures instead of half of them.
A: Thank you for your answer, H-H.
I also did it with help of a friend, so I will also post an answer.
The identity will follow from the Gauß equation:
    \begin{align*}
    \langle {\boldsymbol{R}}(X,Y)Z,W\rangle=\langle \boldsymbol{r}(X,Y)Z,W\rangle-\langle A(Y,W),A(X,Z)\rangle+\langle A(X,W),A(Y,Z)\rangle,
\end{align*}
where, for simplicity's sake, I will use $\boldsymbol{r}$ for the curvature tensor of $\Sigma$ (instead of those $\overline{\boldsymbol{R}}$ and $\boldsymbol{R}$). Let $\{e_1,e_2,\nu\}$ be an orthonormal base for $T_pM$, $p\in \Sigma$ and $\nu\perp \Sigma$. Doing $Y=W=e_1$, $Y=W=e_2$ and summing up the equations, we get
\begin{align*}
      &\langle {\boldsymbol{R}}(X,e_1)Z,e_1\rangle+\langle{\boldsymbol{R}}(X,e_2)Z,e_2\rangle=\langle \boldsymbol{r}(X,e_1)Z,e_1\rangle-\langle A(e_1,e_1),A(X,Z)\rangle\\
      &+\langle A(X,e_1),A(e_1,Z)\rangle+
       \langle \boldsymbol{r}(X,e_2)Z,e_2\rangle-\langle A(e_2,e_2),A(X,Z)\rangle+\langle A(X,e_2),A(e_2,Z)\rangle.
\end{align*}
Denote $A(X,Y)=h(X,Y)\nu$, and therefore $H:=\text{trace}(A)=h(e_1,e_1)+h(e_2,e_2)$. Now, summing to both sides of the equations the term $\langle \boldsymbol{R}(X,\nu)Z,\nu\rangle$, then in the left side we get $\text{trace}(Y\mapsto R(X,Y)Z)=\mathrm{Ric}(X,Z)$. Note that $\langle \boldsymbol{r}(X,e_1)Z,e_1\rangle+\langle \boldsymbol{r}(X,e_2)Z,e_2\rangle=\text{trace}(Y\mapsto \boldsymbol{r}(X,Y)Z)=\mathrm{ric}(X,Z)$. Hence:
    \begin{align*}
    \mathrm{Ric}(X,Z)&=\mathrm{ric}(X,Z)-(h(e_1,e_1)+h(e_2,e_2))h(X,Z)+h(X,e_1)h(e_1,Z)\\
    &+h(X,e_2)h(e_2,Z)+\langle \boldsymbol{R}(X,\nu)Z,\nu\rangle\\
    &=\mathrm{ric}(X,Z)-Hh(X,Z)+\sum_{i=1}^2h(X,e_i)h(e_i,Z)+\langle \boldsymbol{R}(X,\nu)Z,\nu\rangle.
\end{align*}
Now, doing $X=Z=e_1$, $X=Z=e_2$ and then summing up, we have
    \begin{align*}
    \sum_{j=1}^2\mathrm{Ric}(e_j,e_j)&=\sum_{j=1}^2\mathrm{ric}(e_j,e_j)-H\sum_{j=1}^2h(e_j,e_j)+\sum_{i,j=1}^2h(e_i,e_j)^2+\sum_{j=1}^2\langle \boldsymbol{R}(e_j,\nu)e_j,\nu\rangle\\
    &=r-H^2+|A|^2+\sum_{j=1}^2\langle \boldsymbol{R}(\nu,e_j)\nu,e_j\rangle\\
    \\
    &=r-H^2+|A|^2+\mathrm{Ric}(\nu,\nu).
\end{align*}
Finally, summing the term $\mathrm{Ric}(\nu,\nu)$ to both sides and using that $r=2K$, we get
    \begin{align*}
    R=2K-H^2+|A|^2+2\mathrm{Ric}(\nu,\nu).
\end{align*}
