Demencia literally translates to "dementia", the medical condition affecting memory. It's a very rare and powerful word to find in a song.
In "Pasado", the singer uses it metaphorically, singing "Sufro demencia para olvidarme / Lo mucho que te quería" (I suffer from dementia to forget / How much I loved you). He wishes for this condition to erase the painful memories of a lost love, showing the extreme depth of his heartbreak and making this a truly unforgettable lyric.
This song is all about wanting a do-over with someone you've lost. The singers are lost in a daydream where they're back with their ex, imagining them dancing close together, "Bailando a tu lado / Así abrazados" [Dancing by your side / Embraced like this]. In this fantasy, the other person never left, and all the sad nights are finally in the past. It's a powerful wish to turn back time and pretend a painful breakup never happened, just like their ex once promised things would be.
But then the song hits you with the reason for all this pain. The singer admits it was their fault, with the brutally honest line, "Yo por estúpido no fui sincero" [Because I was stupid, I wasn't sincere]. They are so full of regret that they wonder how much anesthesia they would need to stop feeling the hurt. It's a song about messing up badly and now being haunted by the memory of what you had, desperately hoping for a second chance.