We study by $\Gamma$-convergence the discrete-to-continuum limit of the Blume–Emery–Griffiths model describing the phase transition of a binary mixture in presence of a third surfactant phase. In the case of low surfactant concentration we study the dependence of the surface tension on the density of the surfactant and we describe the microstructure of the ground states. We then consider more general (n-dimensional) energies modeling phase transitions in presence of different species of surfactants and, in the spirit of homogenization theory, we provide an integral representation result for their $\Gamma$-limit. As an application we study the ground states of these systems for prescribed volume fractions of the phases.