Found it.We never found out. We do know he had major problems in the past since before we meet him he had forgotten Darlene before. I had a theory written up in the season 1 thread, I'll look it up and paste it here when I get home.
My current working theory on what's going on.
When Elliot first found proof that Evil corp killed his dad he snapped and started acting the way we see Mr Robot act when Elliot isn't around. This lead to trouble with the law and his court ordered therapy that possibly had him in an institution for a while. In order to get out he needed to "get better" so his personality split into two parts. The cold logical part that shuts everyone out that we know as Elliot and the angry motivated part that needs revenge for his father. In order to keep his emotion in check the Elliot part had to forget certain things that would push him over the edge. The morphine helped to keep things separate and kept Elliot from thinking too deep about his past. Once it was gone there was too much going on to care until now.