Concept:
Metformin is an oral antidiabetic drug belonging to the biguanide class.
Step 1: Type 2 diabetes mellitus commonly involves insulin resistance.
Step 2: Metformin reduces hepatic glucose production.
Step 3: It also improves insulin sensitivity in peripheral tissues.
Step 4: It usually does not cause significant weight gain.
Step 5: Therefore, metformin is used in type 2 diabetes mellitus.
\[
\boxed{\text{Type 2 diabetes mellitus}}
\]