Can't follow it without a diagram of the relay, but assuming that that it's a two way switch with either pin 87 or pin 87 a as the hot output (but not both) and input load on pin 30, with 85 and 86 switching it,
you should have the existing Low +ve in 30 and the bulb low connected to 87 or 87a and the bulb high to the other one. If your dipswitch works backwards, swap them over.
The bulb ground can be connected through either of the bike harness connector ground wires. Use the Harness low connector for this.
Pins 85 and 86 should be connected to the bike harness High beam - one wire to each pin. That will switch the relay and switch between high and low beam. Again, connecting 85 and 86 the wrong way around could make the dip switch operate backwards if the relay is polarity sensitive.
If I've got the pin numbering right and if I've read your diagram correctly, what you're proposing seems right. I'm guessing that you're going to make a little sub harness that includes the relay and will plug into the existing high and low beam connectors and plug on to the H4 connector of your new light. I'm also assuming that you're fitting the LED unit.
Rob