Hi Mikhail,
Just to add that I think this should read 'onto' (preposition) rather than 'on to', and although this might seem like a small point, it is a difference a dictionary will make. If you look up 'onto' you might be surprised by the different meanings of this little word.
As an expression 'being onto something' implies 'significance' - to have information that will help you make an important discovery, so in the context of your quote it might mean, that once he realised/knew he wasn't a bad person (because he made mistakes) he 'discovered' he could think positively about himself and become a more accomplished/skilled person.
HTH