  Let $\big(\mathscr{X}, \langle\cdot, \cdot\rangle\big)$ be a Hilbert
$C^*$-module over a $C^*$-algebra $\mathscr{A}$ and let
$\mathcal{S}(\mathscr{A})$ be the set of states on $\mathscr{A}$. In this
paper, we first compute the norm derivative for elements $x$ and $y$ of
$\mathscr{X}$ as follows \begin{align*} \rho_{_{+}}(x, y) =
\max\Big\{\mbox{Re}\,\varphi(\langle x, y\rangle): \, \varphi \in
\mathcal{S}(\mathscr{A}), \varphi(\langle x, x\rangle) = \|x\|^2\Big\}.
\end{align*} We then apply it to characterize different concepts of
orthogonality in $\mathscr{X}$. In particular, we present a simpler proof of
the classical characterization of Birkhoff--James orthogonality in Hilbert
$C^*$-modules. Moreover, some generalized Daugavet equation in the
$C^*$-algebra $\mathbb{B}(\mathcal{H})$ of all bounded linear operators acting
on a Hilbert space $\mathcal{H}$ is solved.
