Pioglitazone is used to treat diabetes mellitus by improving insulin sensitivity and promoting adipose tissue differentiation.