**Abstract** : We argue that the main reason of crisis in quantum theory is that nature, which is fundamentally discrete and even finite, is described by
classical mathematics involving the notions of infinitely small, continuity etc. Moreover, since classical mathematics has its own foundational problems which cannot be resolved (as follows, in particular, from G\"{o}del's incompleteness theorems), the ultimate physical theory cannot be based on that mathematics. In the first part of the work we discuss inconsistencies in standard quantum theory and reformulate the theory such that it can be naturally generalized to a formulation based on finite mathematics. It is shown that: a) as a consequence of inconsistent definition of standard position operator, predictions of the theory contradict the data on observations of stars; b) the cosmological acceleration and gravity can be treated simply as {\it kinematical} manifestations of quantum de Sitter symmetry, {\it i.e. the cosmological constant problem does not exist, and for describing those phenomena the notions of dark energy, space-time background and gravitational interaction are not needed}.
In the second part we first prove that classical mathematics is a special degenerate case of finite mathematics in the formal limit
when the characteristic $p$ of the field or ring in the latter goes to infinity. {\bf This implies that mathematics describing nature at the most fundamental level involves only a finite number of numbers while the notions of limit and
infinitely small/large and the notions constructed from them (e.g. continuity, derivative and integral) are needed only in calculations describing nature approximately}. In a quantum theory based on finite mathematics, the de Sitter gravitational constant depends on $p$ and disappears in the formal limit $p\to\infty$, i.e. gravity is a consequence of finiteness of nature. The application to particle theory gives that the notion of a particle and its antiparticle is only approximate and, as a consequence: a) the electric charge and the baryon and lepton quantum numbers can be only approximately conserved; b) particles which in standard theory are treated as neutral (i.e. coinciding with their antiparticles) cannot be elementary. We argue that only Dirac singletons can be true elementary particles and discuss a conjecture that classical time $t$ manifests itself as a consequence of the fact that $p$ changes, i.e. $p$ and not $t$ is the true evolution parameter.