The narration which states that the Prophet peace be upon him used to say this du’a when he looked at himself in the mirror is weak. However, this du’a is mentioned in another narration which is authentic, but the authentic hadith does not say anything about when looking in the mirror specifically. Therefore, this du’a should be said in general, but not specifically when looking in the mirror because this is not established in the authentic sunnah.
اللهم كما أحسنت خَلقي فأحسن خُلقي
Allahumma kama ahsanta khalqi fa ahsin khuluqi
Oh Allah, as you have perfected my creation, so too perfect my character