We study the electromagnetic Dalitz decay $J/psi to e^+e^- eta$ and search for di-electron decays of a dark gauge boson ($gamma$) in $J/psi to gamma eta$ with the two $eta$ decay modes $eta rightarrow gamma gamma$ and $eta rightarrow pi^+pi^-pi^0$ using $(1310.6pm 7.0)times10^6$ $J/psi$ events collected with the BESIII detector. The branching fraction of $J/psi to e^+e^- eta$ is measured to be $(1.43 pm 0.04 ({rm stat}) pm 0.06 ({rm syst}))times 10^{-5}$, with a precision that is improved by a factor of $1.5$ over the previous BESIII measurement. The corresponding di-electron invariant mass dependent modulus square of the transition form factor is explored for the first time, and the pole mass is determined to be $Lambda = 2.84 pm 0.11({rm stat}) pm 0.08({rm syst})$ GeV/$c^2$. We find no evidence of $gamma$ production and set $90%$ confidence level upper limits on the product branching fraction $mathcal{B}(J/psi to gamma eta)times mathcal{B}(gamma to e^+e^-)$ as well as the kinetic mixing strength between the Standard Model photon and $gamma$ in the mass range of $0.01 le m_{gamma} le 2.4$ GeV/$c^2$.