I do not think these cars had adapative headlights.
Do the lights work?
That broken bit is not really part of the headlight. If you check online car parts shops, they sell the body without this plastic cover.
www.carparts4less.co.ukwww.autodoc.co.ukThey also sell the headlight without the leveling motor.
So if the lights turn on, you could replace the plastic cover and possibly fail on aim but this is easily fixed.
You could try asking the online car breakers for a price for the headlights if they are the same as yours:
https://www.ebay.co.uk/itm/2010-Mazda-6-Est-2-0-Sport-Breaking/143421142689?hash=item216490f6a1:g:5a4AAOSwwUJdsQCTIt looks like a sports alloy on it and so it may has xenon headlights. But still if they work, you could replace the plastic cover and be ready for MOT.
Maybe there is a part number somewhere visible around the headlight and by googling that, you could trace the different components that come with it or find a new or used unit at a reasonable price.