A 57-year-old man is admitted to the hospital for evaluation of substernal chest pain. His medical history is significant for type 2 diabetes mellitus, coronary artery disease, hypertension, and hyperlipidemia. He manages his diabetes as an outpatient with diet, exercise, and metformin. His other medications are aspirin, metoprolol, atorvastatin, and sublingual nitroglycerin as needed. His inpatient plasma glucose values are 170 to 210 mg/dL (9.4-11.6 mmol/L). Results of all other laboratory studies are normal.

Which of the following is the most appropriate treatment for this patient's diabetes while hospitalized?