What is the formal process for a theory to get accepted by the science community?
There is no formal process. But before much of anything can happen, a new theory needs to be widely seen and evaluated. A period of independent verification of its predictions needs to happen. This was the case even for Einstein.
But self publishing a book is not a great way to disseminate your ideas as it will probably be seen by very few people unless you are already very prominent.
In the case of Einstein, in fact, there were, at the time, more or less generally accepted competing theories and those who held them were resistant to accept his ideas, but were also very powerful. As they &quot;left the scene&quot;, his ideas became more accepted by younger physicists, but it also took experimental verification for the ideas to become dominant.
If you want to have your ideas widely disseminated, you need to publish in accepted journals or have them presented at conferences.