Headlamp (light) socket wire failure



First question is has anyone else experienced this?

Second question is what do you have to take apart to replace the socket? Space is limited and it is impossible to see where the wires go.
One other note - My vehicle is 6 years old and I would say that I have had the light switch set to "auto" for most of its 70,000 miles. I imagine that could have led to wires failing.



