The OP has identified some of the reasons for Javert's suicide. He does sing "Damned if I'll live in the debt of a thief!" but the central reason is the conflict created in his mind by Valjean's actions. He shows this when he sings "And must I now begin to doubt, who never doubted all these years."
I myself have found this difficult to reconcile from a modern western perspective. One must realize, though, that Javert has spent his life fighting the internal shame of his low birth ("I was born inside a jail... I am from the gutter too.") with a strict adherence to the law. In differentiating himself from the "scum" he grew up seeing he has created an inflexible dichotomy between righteous and evil men and left himself unable to see that a person can cross that divide ("Men like you can never change"). He was unable to see the good and bad in every man and did not believe a person could make such a fundamental change.
And really, men dealing with change is what the entire story is about. The revolutionary change of 19th century France; Marius' struggle with his changing ideals; Valjean's change from criminal to upright citizen. Each character was dealing with the internal struggle created by these changes. Javert could not come to terms with it and the contradictions it presents.
All of this is shown in the lyrics but you have to really pay attention to the details of what Javert is saying. Some of these details are exposed during the confrontation duet where both characters are singing simultaneously and can be tough to pick out. I must commend the writers of the musical for managing to bring out so many of Victor Hugo's complex characters. To take a 1200+ page book and turn it into a 2 1/2 hour play is a real accomplishment.