You didn't tell us what medication you were taking and we really need to know that. But, the bottom line is, you WERE taking this med for a year and a half every day. I will assume that is how it was prescribed to be taken. Then 6 months ago, you decided to take it on an "as needed" basis. This was not a good decision, and very likely explains what is happening to you now. Benzo's especially MUST be tapered off of very slowly, especially after long term use, which you did. You should never just stop taking a benzo cold turkey. The same can be said for most of the antidepressants as well.
What should you do? Go to your doctor! Tell him/her what you've done and they will help you get back on track.
And NEVER mess about with these meds on your own again! But I think you've learned THAT lesson already.
You'll be fine once you see your doctor.
Peace
Greenlydia