"self grounding" means that your "third wire" is the headlight-housing itself - i.e. the ground. Not exactly the best way to do that, but it works (that's why the OEM used three wires).
Quick way to tell: switch on the bike, switch to low-beam - check with a multimeter set to DC-volt scale, any setting above 12v, red MM lead to the wire, black lead to the bike frame: the wire that has 12v goes to the low-beam on the new light.
Switch to high-beam - the wire that NOW has 12v goes to the high-beam. (or, if you have a "dual" setup, the one that was previously dead but now hot).
Ground the remaining (not hot) wire to the new headlight-housing. I would drill a small hole and attach with a crimped ring-connector using a machine-screw and locknut through the housing, or ground it under a mounting-bolt, ensuring that any paint or chrome was filed-off the contacting surface.
Good Luck.