Khud ko jo khoya toh vo hogaaya haasil
I’m still working through lyrics as a means of learning Hindi. For me, it’s much more fun and easier to practice because they get stuck in my head and I find myself practicing during the work day!
So as far as the above sentence goes - can it be translated like this? “When I lost myself I obtained/achieved her”?
Khud - self, khoya - I lost, hogaaya haasil - it was achieved/obtained?
Your translation is right. However, due to the masculine form that 'ho gaya' is in, it should be 'When I lost myself, I obtained it/him'.
'Ho Gaya' is agreeing with the gender of 'vo' not the gender of the speaker.
I think in this context, I would translate it as 'it' (referring to the heart from the previous line perhaps).