To put it in simple terms, you have a cluster of neurotransmitters that do not all work at the same time. You can absorb more information than you need. If they did not decide what is important and not important you would be so overloaded with information you would not be able to move for lack of direction. Previous experiences give you this direction and dictates which ones will feed information and which sleep, so to speak. Chemical changes can effect how they work. Trauma can cause these chemical changes. Since the gates that open and close at the neurotransmitters are chemical, imbalances can greatly effect mood.
Hence the expressions, I just can't think straight, and I just don't know what direction to go.
Too little information going through usually causes depression more than anxiety and too much can cause either or both. Too many thoughts pulling at you at the same time leaves you with no direction. Drugs do two things, tranquilizers slow down the thoughts, SSRIs do similar by putting the chemicals back in balance. CBT reduces the need for either reducing the load to more acceptable terms and in mild cases or over time can get you back on line.
Major depression really does need medical attention, at least till the chemical balance is restored.
The above is how it was taught to me. It is not gospel. Only a doctor can really diagnose depression since there really are no simple tests.
Davit.
PS. Memory can not be erased but it can be put on the back burner with CBT and since memory dictates how you act you want to do this with all the negative ones.
CBT does work, but sometimes it needs a little help.