Is this passive voice? So, is the passive voice version of this sentence: "He hated math his whole life" or "He had hated math his whole life." If not, what tense is it?
Neither of the examples is passive voice. The first example is past tense with active voice - the person doing the hating is identified (He). The second example is the pluperfect tense and again active voice. Pluperfect tense carries the implication that the hating ended at some point "he had hated math until....."
Passive voice means that the entity doing the action is not specified. A passive voice example might be "Math is often hated".
'Tense' and 'voice' are different grammatical concepts.