“Life lessons, the rager period of my life, and fighting my demons,” Cudi said about the content of his first book, set for release on Aug. 5