Background The aim of this study was to determine the contribution of emotion regulation, defense mechanisms and attachment in predicting psychosomatic symptoms by adjusting gender and level of anxiety. Methods The research method was path analysis. For this purpose, 540 patients with psychosomatic disorders in Tehran were selected by purposive sampling method. They answered the questionnaires of distress tolerance, emotion regulation, defense mechanisms and psycho-somatic symptoms PHQ-15. To analyze the data, path analysis with the observed variables was used. Results Findings showed that gender differences in regard to emotion regulation, attachment styles, and defense mechanisms in predicting psychosomatic symptoms were not the same with respect to the level of anxiety in individuals. In terms of attachment and emotional regulation, the difference in predictive path coefficients at low and high anxiety levels is not significant, but there is a significant difference in neuroprotective defense mechanism at low anxiety levels. In conditions of high anxiety, there are no gender differences between any of the path coefficients, and the level of anxiety is still an important factor in the contribution of attachment styles, defense mechanisms and emotional regulation in predicting psychosomatic symptoms. Conclusion In other words, when the level of anxiety is low, more neurotic women show more psychosomatic symptoms than men with low levels of anxiety.