Women unable to have children even after fertility treatment are nearly three times more likely to suffer depression.
The reason for mental health problems is the 'unfulfilled wish' to have a family, researchers claim.
However women who are able to 'let go' of their maternal desire are more likely to be happy.
The study was the first to look at a large group of women to assess their mental health over a decade after unsuccessful fertility treatment.
Women unable to have children after fertility treatment are nearly three times more likely to suffer depression
Scientists took into account whether the 7,000 women already had children and what fertility treatment they had taken.
The ladies had attended a range of IVF hospitals in the Netherlands between 1995-2000.
Mental health questionnaires were then completed 11-17 years after the treatment, which included ovarian stimulation, intrauterine insemination, and in vitro fertilisation.
At the time of answering the study's questionnaire, six per cent of women still wanted children.
This was strongly linked with a 2.8 times increase in the risk of suffering mental health problems, according to the study, published in the journal Human Reproduction.
Lead author Dr Sofia Gameiro, from Cardiff University, said: 'It was already known that people who have infertility treatment and remain childless have worse mental health than those who do manage to conceive with treatment.
'However, most previous research assumed that this was due exclusively to having children or not, and did not consider the role of other factors.'
She added: 'We found that women who still wished to have children were up to 2.8 times more likely to develop clinically significant mental health problems than women who did not sustain a child-wish.
'For women with children, those who sustained a child-wish were 1.5 times more likely to have worse mental health than those without a child-wish.
A fifth of women found fertility treatment to be mentally challenging, due to the anxiety it can cause
'This link between a sustained wish for children and worse mental health was irrespective of the women's fertility diagnosis and treatment history.'
However, it was also revealed that those who started treatment at an older age had better mental health than those who started younger.
And those who were married or cohabiting with their partner had better mental health than women who were single divorced or widowed.
Better educated women also had better mental health than the less well educated.
Dr Gameiro added: 'Our study improves our understanding of why childless people have poorer adjustment.
'It shows that it is more strongly associated with their inability to let go of their desire to have children.
'It is quite striking to see that women who do have children but still wish for more children report poorer mental health than those who have no children but have come to accept it.'
She went on to say: 'The possibility of treatment failure should not be avoided during treatment and a consultation at the end of treatment should always happen, whether the treatment is successful or unsuccessful, to discuss future implications.
'This would enable fertility staff to identify patients more likely to have difficulties adjusting to the long term, by assessing the women's possibilities to come to terms with their unfulfilled child-wish.
'These patients could be advised to seek additional support from mental health professionals and patient support networks.
'It is not known why some women may find it more difficult to let go of their child-wish than others.
'Psychological theories would claim that how important the goal is for the person would be a relevant factor.
'The availability of other meaningful life goals is another relevant factor. It is easier to let go of a child-wish if women find other things in life that are fulfilling, like a career.
'We live in societies that embrace determination and persistence. However, there is a moment when letting go of unachievable goals (be it parenthood or other important life goals) is a necessary and adaptive process for well-being.
Read more: http://www.dailymail.co.uk/health/article-2749585/Infertility-really-does-cause-heartache-Women-t-children-three-times-likely-depressed.html#ixzz3Cx2VvZXy
Follow us: @MailOnline on Twitter | DailyMail on Facebook