The mirror energy difference (MED) of the mirror state, especially for states bearing the Thomas-Erhman shift, serves as a sensitive probe of isospin symmetry breaking. We employ the Gamow shell model, which includes the inter-nucleon correlation and continuum coupling, to investigate the MED for
sd-shell nuclei by taking the
18Ne/
18O and
19Na/
19O as examples. Our GSM provides good descriptions for the excitation energies and MEDs for the
18Ne/
18O and
19Na/
19O. Moreover, our calculations also reveal that the large MED of the mirror states is caused by the significant occupation of the weakly bound or unbound
s1/2 waves, giving the radial density distribution of the state in the proton-rich nucleus more extended than that of mirror states in deeply-bound neutron-rich nuclei. Furthermore, our GSM calculation shows that the contribution of Coulomb is different for the low-lying states in proton-rich nuclei, which significantly contributes to MEDs of mirror states. Moreover, the contributions of the nucleon-nucleon interaction are different for the mirror state, especially for the state of proton-rich nuclei bearing the Thomas-Erhman shift, which also contributes to the significant isospin symmetry breaking with large MED.