How many years will those mental issues last? WAY too many factors to tell. Some people use regularly and claim they feel no different in their sober life, which i think is complete utter bull shit.
For the people who do feel changes, many of them go through issues for months at the minimum. Usually by 1 whole solid year of no MDMA and light usage or no usage of other drugs people say they are feeling near or at 100%
But there are a few people who either abused hard or just had bad reactions with MDMA , who say years later they still don't feel 100%. So it all depends, but simple answer within 1 year you would usually feel like your old self.