People born in the 1960s and 70s stand out as the generation most likely to die by suicide or drug poisoning, data for England and Wales shows.
The higher rate of fatalities began in the 1980s and 90s when people belonging to Generation X were in their 20s, and is still occurring in the now middle-aged cohort, says the Office for National Statistics.
Public Health England says the trend overlaps with patterns of heroin use.
But other factors will also contribute.
Heroin use increased markedly through the 1980s and early 90s, which is when the rise in drug-related and suicide deaths among Generation X began.
Fast-forward to 2017 and opioid drugs, which include heroin, contributed to around half of drug poisoning deaths - 1,985 of 3,756 - in England and Wales.
Again, 40 to 49-year-olds from Generation X had the highest rate of drug misuse deaths.
A similar age pattern is seen for deaths caused by suicide. In 2017, 49 was the age at which most people died by suicide, whereas in 1993 it was 22.
Changes in male suicide rates (which make up the bulk of suicide statistics) in Europe from the early 80s to 2011 show a link to unemployment and financial instability or poverty.
Deprivation has also been linked to drug poisoning deaths.
In 2017 - the latest figures available for England and Wales - there were more suicides among the most deprived communities across most age groups, but rates were highest among middle-aged people.
Ben Humberstone from the ONS said: "The reasons behind these deaths are complex, but our most recent data suggests that those currently living in the most deprived communities are at the highest risk."
The next set of statistics on drug poisoning deaths in England and Wales in 2018 are due to be published on Thursday, with data on suicides out next month.
The Samaritans charity says the findings should help inform policy into suicide prevention.
Samaritans spokeswoman Charlotte Simms said: "We know that suicide rates are currently higher among people in their 40s and 50s and particularly among men.
"But this data from the ONS suggests it isn't just related to age but is a risk that has been carried by a generation of people and there are lessons to learn from that."
She said the Samaritans' own research suggests relationship breakdown and job instability are important risk factors for this higher risk group.
"This is a generation - a buffer generation - caught between an older one and a more progressive younger one. Their father may have had a job for life, yet they may not."
She said while the overall male rate of suicide has been falling in recent years, there has been an increase in suicide rates among younger people, which is also concerning.
"We need to reach people before they get to crisis point. It's about embedding suicide prevention in all areas of policy - housing and welfare, for example - to tackle inequalities."
Stephen Buckley, from the mental health charity Mind, said it was possible that people born in the 1960s and 70s feel a greater sense of stigma in talking about mental health problems and seeking help than those born since then.
"It's important that anyone who needs support for their mental health is able to access it. Every suicide is a tragedy and most are preventable which is why we need to see meaningful change for people trying to access support now."
If you are struggling to cope, please call Samaritans free on 116 123 (UK and Ireland) or visit the Samaritans website to find details of the nearest branch. Samaritans is available round the clock, every day of the year. Mind has a confidential telephone helpline- 0300 123 339 (Monday-Friday, 9am-6pm).