Breast cancer represents the most common type of cancer worldwide among women. One of the most important diagnostic methods of this disease are mammograms, however, the high prevalence of breast cancer has not been reduced due to the incorrect diagnosis of these images, since they can be complex to interpret. An approach that represents a fundamental process for the improvement of this diagnosis is digital image processing, since it can facilitate the interpretation of the images for the specialists. In this work is proposed the implementation of a new multilevel segmentation approach based on the minimum cross-entropy threshold - Harris Hawks Optimization (MCET-HHO) metaheuristic algorithm, identifying regions within the breast that have abnormal tissue. Then, these regions are subjected to an automatic classification system based on a bag-of-visual-words (BoVW) approach to identify healthy tissue, benign tumors, and malignant tumors. According to the results, the classifier reached an average accuracy of 0.86 in the training stage and 0.73 in the testing, proving to be statistically significant in the automatic classification of mammograms, presenting a preliminary tool for the support of specialists in the diagnosis of mammography images.