Dementia due to metabolic causes is a loss of mental function that can occur with diabetes, thyroid disease, and other metabolic disorders.