It is a fundamental mistake to imagine that when we see the non-value in a value or the untruth in a truth, the value or the truth ceases to exist. It has only become relative. Everything human is relative, because everything rests on an inner polarity; for everything is a phenomenon of energy. Energy necessarily depends on a pre-existing polarity, without which there could be no energy. There must always be high and low, hot and cold, etc. so that the equilibrating process ― which is energy ― can take place. Therefore the tendency to deny all previous values in favor of their opposites is just as much of an exaggeration as the earlier onesidedness. And in so far as it is a question of rejecting universally accepted and indubitable values, the result is a fatal loss.
What does the underlined word, <it> refer to?
I think "it" refers to the tendency to deny all previous values in favor of the current opposite values. What the text says is that if that denial affects universally accepted and indubitable values, the result is a fatal loss.
Also, I am a little bit confused what <the earlier onesidedness> indicates?
Is it being mentioned in the writing? Or Is it just for comparison?
I think "the earlier onesidedness" refers to the previous belief that there was only one possible truth or value. What the author says is that, as new truths or values are discovered, earlier ones should not be denied because they are interrelated with the new ones. Denying them would be a new form of onesidedness.