When I almost lost you, I saw my own tainted heart.

Literal

You [obj-を] lose-almost time, I [topic-は] self [gen-の] dirty heart [obj-を] saw.

失いかけた 'almost lost' uses ~かける for actions that nearly happened but didn't complete. 汚れた心 'tainted/dirty heart' uses the past-participle of 汚れる 'to become dirty' as a modifier. 俺 is the masculine first-person pronoun. A dramatic, confessional statement with the weight of a pivotal character moment.