Ozzy Osbourne wrote that his family thought 'he was a goner' months before he died