  We carry out the first lattice QCD derivation of the mixing energy and the
mixing angle of the pseudoscalar charmonium and glueball on two gauge ensembles
with $N_f=2$ degenerate dynamical charm quarks. The mixing energy is determined
to be $49(6)$ MeV on the near physical charm ensemble, which seems insensitive
to charm quark mass. By the assumption that $X(2370)$ is predominantly a
pseudoscalar glueball, the mixing angle is determined to be approximately
$4.6(6)^\circ$, which results in a $+3.9(9)$ MeV mass shift of the ground state
pseudoscalar charmonium. In the mean time, the mixing can raise the total width
of the pseudoscalar charmonium by 7.2(8) MeV, which explains to some extent the
relative large total width of the $\eta_c$ meson. As a result, the branching
fraction of $\eta_c\to \gamma\gamma$ can be understood in this
$c\bar{c}$-glueball mixing framework. On the other hand, the possible
discrepancy of the theoretical predictions and the experimental results of the
partial width of $J/\psi\to\gamma\eta_c$ cannot be alleviated by the
$c\bar{c}$-glueball mixing picture yet, which demands future precise
experimental measurements of this partial width.
