Yes, sometimes medicine could be the reason for anxiety and depression. This is one of the most overlook cause of anxiety. We take medications for blood pressure, acne, and sugar, etc. However, we don’t know what the effect of these medications on our health is. If you use birth control pills, then you are more likely to develop depression.
So, I would recommend you to consult with your doctor if you take medication on a daily basis.