Hello jaeson
To answer your question I first have to explain how the mind works.
Unlike animals we are born with very few inherited instincts and actually very little in our minds. Over time we fill it and it dictates who we are and how we think. Like most people I used to think life just happened day by day. Not so. Everything in our lives is dictated by memory of past thoughts and actions.
This is called a thought triangle or when negative a panic triangle. It is not well known and I got it from my therapist. It makes sense tough and is an eye opener.
Every thought and action is dictated by this triangle. It also happens very fast so you won't notice it till you have a panic attack.
This is how it works:
A stimulus sets off a thought to do something (first corner) that thought goes to memory (second corner) so see what it knows about this thought. Memory dictates the action that will happen from the thought from the first corner. This action (third corner) then recycles back to the first corner to stimulate the next thought and back to memory for future reference. This thought on the thought or action from the third corner now goes to the top of the pile in memory and is the first accessed in an associated thought from the first corner. If the next thought is not related it won't be used but never the less it will be stored for future. The mind has an immense capacity for storage.
Lets say the thought in the first corner is a trigger. The memory searches for past reactions to this trigger and tells the third corner what to think or do. This is the fight or flight syndrome of panic. If it doesn't have an appropriate action it will recycle back to memory and go round and round the triangle till it finds an appropriate one or decides to shut down because the thought is not logical. Akin to getting side tracked. This not being able to find an appropriate action to act on or store is part of the confusion that happens during a panic attack. The other symptoms are survival reactions to panic in general. Racing heart, heightened awareness etc. But some can be warped because of past memory.
CBT works by changing thought patterns between the second and third corner so future triggers will not cause negative thoughts in memory and not cause a negative reaction in the third corner. This in turn will be stored for future thought at the top of the list. Not a guaranty since the mind does search for the best solution and here is where attitude comes in. If you want a negative solution you will get one if there is one in memory.
So to answer your question, low esteem makes a person tend to think negative and these negative thoughts will be used in associated situations. Low esteem is associated with core beliefs which are associated with attitude which can reinforce or break a core belief whether it is negative or positive. Core beliefs greatly affect esteem. Core beliefs can cause what we call the blues which is mild depression of the thought kind rather than the chemical kind but since it uses up mood chemicals it can over time turn into it. Depression of either kind causes negative thoughts that affect the triangle and it becomes a vicious circle that has to be broken by CBT.
Meds only slow down the amount of thoughts with some blocking access to negative ones. This can be dangerous but the worst part is the thoughts are still there and unless you replace them with CBT processes they will come back with a vengeance when the meds are stopped.