Sleep help and melatonin

Nhu

So ever since high school started my anxiety level has been worse than ever. I cannot go to sleep at the hour i needed to, so i started taking melatonin. I was young and didn’t notice that I had taken the 10gm melatonin. Which would help me pass out. Ive been taking them for about a year, with several month long breaks in between. Now, I’m trying to get off of the melatonin pills. Anything that would help?