A differential gene expression analysis was performed in two studies of type 2 diabetes on pancreatic samples (Langerhans cells). In both cases the Epidermal Growth Factor Receptor (EGFR) was identified as the top hub gene in the protein-protein interaction networks of the upregulated genes. Functional enrichment analysis revealed that EGFR is also involved in pancreatic cancer signaling pathways. A virtual screening was conducted using EGFR inhibitors from the ZINC20 database. The results were filtered based on binding energies as well as ligands' absorption, distribution, metabolism, excretion, and toxicity (ADMET) properties. To further filter the results, two machine learning models were implemented and trained on a different set of ligands obtained from the ChEMBL database, one for regression and another for classification, to respectively predict pIC50 values and bioactivity class, resulting in six finalist compounds with viable characteristics, in terms of bioactivity and drug likeness, to be developed as EGFR inhibitors. Approved drugs afatinib, erlotinib, and almonertinib were used as controls, and in all cases the finalist compounds obtained better scores than the control drugs