A new definition of the function of a differential operator that leads to local operators of infinite order is proposed. It allows one to obtain an expression for the square root of the differential operator (the Hamiltonian of a free spinless particle) and to determine the relativistic Schr¨odinger equation as a close analog of the non-relativistic Schr¨odinger equation. It is shown that this equation does not lead to difficulties of the Klein-Gordon equation. Boundary conditions that lead to self-adjoint boundary problems similar to Sturm-Liouville problems, periodic boundary value problems, and singular boundary value problems are determined. Some problems of relativistic quantum mechanics are solved.