There is no med that is recommended to be taken long-term for insomnia. That doesn't mean that might not be the only alternative for some people, but for most taking any drug because of sedation side effects will eventually probably stop working and lead to something called rebound insomnia, which means not solving the problem and relying on medication can make it worse in the long term. In this case, you took an antidepressant known for causing tremendous weight gain in most who take it and is an antidepressant, meaning it does a lot to change the way your brain naturally functions, because it also has an unwanted side effect of sedation. Now, it your sleep problem was caused by depression, it would make more sense. In any case, when a med stops working, it's time to reevaluate. You can either try another med that has the unwanted side effect of being very sedating, such as certain antihistamines or other antidepressants, you can try sleeping pills of one kind or another, you can try certain anti-anxiety drugs that are sedating, but you'll probably end up where you are now, having to go through the tough problem of stopping a med y0ur brain has become used to. The alternative is trying therapy, exercise, meditation (not right before sleep), natural remedies such as melatonin, and try to actually fix the problem, not medicate it. These are your two options at this point, and neither choice will be easy. Can I ask, were you diagnosed with depression? Or anxiety? What non-medication modalities have you tried to fix this? It's a hard place to be, and I hope you find a way that works. If you want to go the medication route, your psychiatrist or doc is the person to talk this out with, I would think, but again, if insomnia was the only problem you had, not depression or anxiety, remember, this med only worked because of an unwanted side effect, not because it treats insomnia. No drug treats insomnia, they just make you really tired if they're sedating. And sometimes for some people this is the best you can do and there are a lot of drugs out there that have this side effect.
I had better luck sleeping after I cut out all caffeine. Caffeine lasts a long time in my body. Caffeine in the morning would still keep me awake at night.
Lunesta is a sleep med I've taken.
Ativan can be used as a sleep med. (Will need to discuss with doctor. Depends on the individual.)
There's a tea which is marketed as helping to induce sleep or reduce stress. (May work as well as a placebo. Placebos work pretty well.)
Possibly setting an alarm clock for a desired wake-up time, and getting up at that time for a week, can help resync the body clock and sometimes I'll start waking up at that time just a minute before the alarm goes off.