I have suffered from depression (diagnosed) most of my life. From my research, I believe it is what is called "atypical depression", but all the doctors I've encountered don't care about typical or atypical. Anyway, many years ago, when I was not on any medication, I suffered a devastatingly severe depressive episode after an orgasmically amazing night on MDMA. After a week, my severe depression was not going away, and I decided to seek medical help and was put on antidepressants. This helped me very much.
I have taken Piracetam as a nootropic at doses as high as 10 grams a day and I felt no effect, even after several months. Furthermore, Piracetam does not affect the parts of the nervous system that cause post-MDMA depression, so unless your friend had a stroke or something, it shouldn't help.
IMO, your friend needs to be put on an antidepressant. Talking, working it out etc won't help, it's an organic problem. An antidepressant should help, and I don't mean taking it once or for a week; He has to stay on it as per the advice of a good doctor. Also, if your friend is predisposed to depression, I suggest he avoid MDMA altogether; it's just not worth it. I don't mean to sound like an after-school-special. Most other drugs are probably fine, but not MDMA.
Short answer: if Piracetam does help, I'll eat my hat (American expression).