Is there a book by Tolkien where the defeat of Sauron is elaborated, when he lost the ring even before the hobbit adventures?
The concluding section of the book, comprising about 20 pages, describes the events that take place in Middle-earth during the Second and Third Ages. In the Second Age, Sauron emerged as the main power in Middle-earth, and the Rings of Power were forged by Elves led by Celebrimbor. Sauron secretly forged the One Ring to control the others, which led to war between the peoples of Middle-earth and Sauron, culminating in the War of the Last Alliance, in which Elves and the remaining Númenóreans united to defeat Sauron, bringing the Second Age to an end. The Third Age began with the passing of the One Ring to Isildur, who was ambushed at the Gladden Fields shortly afterwards, and lost the ring in the River Anduin. This section also gives a brief overview of the events leading up to and taking place in The Lord of the Rings, including the waning of Gondor, the re-emergence of Sauron, the White Council, Saruman's treachery, and Sauron's final destruction along with the One Ring.
Unfinished Tales contains the chapter "The Disaster of the Gladden Fields" which sketches and somewhat details Isildur's history following his claiming of the One Ring after the fall of Sauron over about 8 pages, with 10 pages of notes.
Tolkien never wrote about this in any great detail; certainly not on the same kind of narrative scale that you see in The Lord of the Rings or The Hobbit; "Of the Rings of Power and the Third Age" in The Silmarillion contains an account of the Last Alliance and overthrow of Sauron, but it's a mere four paragraphs.
The most comprehensive source is actually The Lord of the Rings itself (which contains substantially more information than "Of the Rings of Power...", although it's quite scattered), pulling together material from "Shadow of the Past", "The Council of Elrond" and the Appendices and footnotes.
There is a great deal given in 'Of The Rings of Power and The Third Age' as part of The Silmarillion. However there is no 'story' of narrative-density similar to LoTR, TH or even TCoH. That whole time period is pretty well covered in Unfinished Tales as well, especially if you are interested in Númenor.
All the actual 'history' is present though, either in the appendices to the published LoTR, and in more detail - if sometimes confusing to sort out the 'final' version - in the various parts of The History of Middle-earth.