It is well known that antidepressants, especially SSRIs and SNRIs, will often make the depression symptoms worse during the onboarding period (~2-6 weeks) before the symptoms become alleviated. I'd say this was a failure on your doctor's part for not indicating and emphasizing that.
It also depends on the medication as people have different reactions to different medications, even if they're in the same family of drugs (e.g. SSRI, SNRI, etc.). Some people will have the side effect you mentioned (e.g. suicidal ideation), but feel much better than before the medication after a few weeks. Those same people may not feel any difference on a different medication, even on the highest dosage, and never feel any improvements. Then there's a wide range of reactions in between. Unfortunately, it often takes a while to find the right medication for someone and the journey to do so is rarely pleasant.
This is one of the hardest things about psychiatric pharmacology. There's no go-to medication because you're trying to alleviate symptoms for something that you don't know the exact mechanisms involved (i.e. everyone's brain is different and a "chemical imbalance" or the cause of it in one person isn't the same as another's, even if their symptoms are the same).
With all of that said, I'd definitely recommend attempting cognitive-behavioral therapy before going to medication as a supplement or alternative to CBT, especially if the depression is mild/moderate. For those with severe depression (like me), however, they may not have the motivation/drive/confidence to consistently see a therapist. In those cases, medication might alleviate the symptoms enough for them to do so, which is what happened in my case. Although I don't continue CBT, mostly due to time constraints, I still take anti-depressants to maintain what I've climbed out of so far.
None of this even mentions those with severe, treatment-resistant depression in which the only relief they get is maybe from electroconvulsive therapy (ECT) or transcranial magnetic stimulation (TMS). The former sometimes doesn't work and the latter's effectiveness tends to range from months to weeks and dependent on specific pulse train protocols for those cases.