I am not a doctor, current CF member (just an applicant), etc...
That being said, having issues with anxiety and depression, especially with PTSD in your past CAN put you into a higher risk category for suffering Operational Stress Injuries while serving in the CF. Since all soldiers are required to meet Universality of Service, concerns with anxiety/depression - especially when medication is involved, could reasonably complicate your application. There is all sorts of research about the side effects and potential dangers of withdrawal from certain medications as well. From the extensive Medical that is required it's clear the CF is pretty proactive about identifying any potential problems that could arise from any medical conditions you have. This is just from my own research and studies about OSIs, other applicants that have had trouble with their applications for this reason, etc.
You can still apply despite all of this - and I would greatly encourage you to speak with a recruiter if this is really something you want to do! Anyone can apply, and the worst they can say is "no". If they do, then if your plan is still to try and come off of your medication, medically supervised, then try reapplying in the future. Ultimately it is up to Ottawa whether they reject the medical or not, so there probably aren't many people on here who can give you a definitive answer.
There are quite a few threads about this same topic as well though. Try the search function and see what comes up. Also, someone smarter and more experienced than me may weigh in as well.
Good Luck with everything you do!!