  Let $\Mn$ be the ring of all $n \times n$ matrices over a unital ring
$\mathcal{R}$, let $\mathcal{M}$ be a 2-torsion free unital $\Mn$-bimodule and
let $D:\Mn\rightarrow \mathcal{M}$ be an additive map. We prove that if
$D(\A)\B+ \A D(\B)+D(\B)\A+ \B D(\A)=0$ whenever $\A,\B\in \Mn$ are such that
$\A\B=\B\A=0$, then $D(\A)=\delta(\A)+\A D(\textbf{1})$, where
$\delta:\Mn\rightarrow \mathcal{M}$ is a derivation and $D(\textbf{1})$ lies in
the centre of $\mathcal{M}$. It is also shown that $D$ is a generalized
derivation if and only if $D(\A)\B+ \A D(\B)+D(\B)\A+ \B D(\A)-\A
D(\textbf{1})\B-\B D(\textbf{1})\A=0$ whenever $\A\B=\B\A=0$. We apply this
results to provide that any (generalized) Jordan derivation from $\Mn$ into a
2-torsion free $\Mn$-bimodule (not necessarily unital) is a (generalized)
derivation. Also, we show that if $\varphi:\Mn\rightarrow \Mn$ is an additive
map satisfying $\varphi(\A \B+\B \A)=\A\varphi(\B)+\varphi(\B)\A \quad (\A,\B
\in \Mn)$, then $\varphi(\A)=\A\varphi(\textbf{1})$ for all $\A\in \Mn$, where
$\varphi(\textbf{1})$ lies in the centre of $\Mn$. By applying this result we
obtain that every Jordan derivation of the trivial extension of $\Mn$ by $\Mn$
is a derivation.
