That's an old favorite of mine! It was the first thing I had to do in my X1/9!
Have you tried going in through the access hatch? That's the wrong way! You may eventually get the lamp out, but your skin will be left behind!
Just pop up the lights, remove the black metal cover around the head lamp (two screws), remove the head lamp (another two screws??) and take the lamp out comfortably. Don't touch the adjusting screws each side of the head lamp housing so you don't loose completely the beam's setting.