With the development of computing technology, numerical exact diagonalization method plays a vital role in modern computational condensed matter physics, especially in the research area of strongly correlated electron systems: it becomes a benchmark for other numerical computational techniques, such as quantum Monte Carlo, numerical renormalization group, density matrix renormalization group, and dynamic mean field theory. In this paper, we first numerically exactly diagonalize the three-dimensional hydrogen atom with the combination of finite-difference method, and find that the numerical wave function of ground state is in good agreement with the analytical calculations. We then turn to discuss the space dimension confinement hydrogen system, two-dimensional hydrogen atom, and notice that the numerical wave function is no longer in agreement with the analytical calculation, where the ground state wave function has a numerical singularity as radius approaches to zero. Compared with the case of the three-dimensional hydrogen atom, this issue mainly comes from the nature of space dimension confinement. To resolve such an issue of numerical singularity in two-dimensional hydrogen atom, we need to construct a new discrete and normalized Bessel function as a basis to study the ground state behavior of dimension confinement system based on the framework of Lanczos-type numerical exact diagonalization. The constructed normalized Bessel basis is orthogonal and discrete, and thus becomes suitable for practical calculation. Besides, these prominent properties of such a Bessel basis greatly reduce the complexity and difficulty in practical calculation, and thus makes computing work efficient. In addition, Lanczos-type numerical exact diagonalization method can extremely speed up the process of solving the eigenvalue equation. As a result, such a high efficient calculation of our method demonstrates the consistence between numerical and analytical ground state energy value, and the corresponding wave function with enough truncated basis number. Since this kind of numerical singularity occurs in many space dimension confinement systems, our finding for constructing a new discrete Bessel basis function may be helpful in studying the quantum systems with numerical singularity behaviors in wavefunctions in future. On the other hand, it should be pointed out that the Bessel basis is incorporated into the linear augment plane wave method in the density functional theory to study the electronic band structure of the condensed material and obtain high accurate results, especially in the theoretical prediction of topological insulators and in experimental realization as well.