In my experience of over 15 years as a practising family physician, I would say that the majority of cases presenting to my office had a component, if not a dominant component, of mental illness. It is, sadly, a very common presentation to family physicians, and I would think that it's very much within the scope of practice of almost all general practitioners to deal with mental illness.
Of course, family physicians, when they get into a spot where it feels as though the presentation of the patient is beyond their scope, turn to consultants for further assistance.