Most independent doctors do not work through the Mexican social security system. You will usually have to pay them privately and then get reimbursed by your private insurance company. Consulates and insurance companies always have lists of doctors that can help you, but in some cases the best way to find a great doctor is through word of mouth. If you do not have private insurance, you will have to go to a public hospital, through IMSS, the Mexican Social Security system, or through the Seguro Popular. In some pharmacies, there are doctors that can treat you for a small fee - which is very convenient in cases of the flu or mild illness.
Dentists in Mexico
Just like doctors, dentists in Mexico are well-trained and offer excellent treatment. Dental treatment in Mexico only costs a fraction of similar treatments in the US or other Western countries, which is the reason why many US-Americans travel to Mexico for dentistry work. You might get a list of dentists from your insurance company, or alternatively ask local people for recommendations.
Opticians in Mexico
Most opticians in Mexico are franchise chains, but you will also find some well-stocked independent opticians. Many opticians offer free eye examinations provided you buy from them afterwards. Mexican opticians offer a large choice of glasses and frames, and contact lenses are also widely available. If you are looking for laser eye treatment in Mexico your best choice would probably be a private clinic.