use of the pronoun 'it' in extraposition

I really don't know about this it in the sentence:

[…] I didn't know why I resented it so intensely to have them think of me as something newly minted, but it was – I am certain – echoes of that idea that had been sounding […]

1) To me the first and the second it refer to: have them think of me as something newly minted

2) However, when I replace it with this or that it doesn't seem to refer to anything.

Kindly, is there another manipulation to make sure of it?


In both instances, "it" is an expletive pronoun, sometimes referred to as a dummy pronoun. There is no explicit meaning in either case, no antecedent. Rather, the word is used to fulfill the syntactical requirements of the sentence.

https://en.wikipedia.org/wiki/Dummy_pronoun