I agree with Sally. If you haven't had neuropsych testing, get it done as it will help with your case.
http://www.ssa.gov/disability/profes...dult.htm#12_01
Read 12.02 Organic Mental Disorder. From what you have stated, you certainly meet the criteria. I remember you discussing the issues you were having at work and that even your boss noticed. Maybe he/she may be willing to assist you by completing one of the questionnaires. I can't remember the title of the questionnaire but that may help.
Another way that may be helpful is to go to your local vocational rehabilitation office. They do testing there as well and I believe it is free. Should they find that you are not employable this will also help your case when you do an appeal.
Is this the first time you applied? I can't remember. Most people get denied the first time. I think it's their way of weeding out people who are trying to abuse the system. Getting a lawyer to help with the appeal is a good idea.
Good luck and let us know how it is going.