You need to talk to your doctor ASAP. He can advise you on what type of work accommodation you need and what the process is for getting an accommodation in your locality if it has disability laws that require workplace accommodation such as the US has. He can also help you determine if you need to take disability leave or apply for a permanent disability. Do not quit your job without exploring the disability options.
Plus, a side effect that severe is unusual and he would want to know about it.
Once you have consulted with your doctor and gotten the appropriate paperwork, then go to your company's HR and and do what is necessary.
Your boss is not sure what to say because he doesn't know what type of accommodation you are asking for. Some things can be accommodated and some cannot (a blind person can't be a professional truck driver). When you have the illness it is up to you, in conjunction with your doctor, to determine what you need at work to accommodate the issue and then make specific requests not excuses about how you couldn't do your work properly.
In the future, remember it is always better to be proactive about these things before your boss notices a performance issue both from the standpoint of legality and from the standpoint of your relationship with your boss and coworkers.
Hopefully this is a temporary side effect of adjusting to medicine and may only need a short disability leave.