I will stress first, and foremost (like the others) address the medical issue first. See a doctor, or if you don't want to do that, get some extra sleep, spend more down time, etc. I won't say seeing a doctor is the only way, but those are some pretty serious issues. Also any legal protection you may have under, for example the "disabilities act" will require you to see a doctor.
Now aside from the doctor/legal part, I am going to focus on your question. How do you "tell your boss"? I want to also address some cold facts that a lot of people will try to ignore because it's either polite, or because they legally have to.
First, telling your boss. You really should have a note from a doctor to back you up, otherwise your boss may just think your "whining" or trying to get out of work. Basically, if someone came to me and told me they were having those kinds of issues, I would send them home to see a doctor. If I thought that wouldn't be enough I would tell them not to come back till they had seen a doctor. Those are serious issues. If they still resisted (A boss can really make you see a doctor if it endangers people in the work place but that's a tricky slope) I would think your just making it up to get out of work. Essentially, in my mind no one would have those level of problems and not see a doctor, so I would make/force openings where you could see a doctor, and if you didn't....
But that aside, if you still wish to tell your boss, then your need to tell them just enough to let them know your aware of the problem and most importantly what you are going to do, or what you need to fix the problem.
For an example, if someone came to me and said "I'm having these health issues." My first questions are going to be, Did you see a doctor? Why haven't you seen a doctor? Do you need time off? Do you think you can still do your job? Those questions lead to a bad place, but your not leaving a lot of room. Depending on your job, your basically telling me that not only are you endangering your self, but also others, and the company. Of course this is a larger issue if you work with machinery, or automobiles, but I wouldn't want to risk issues with the coffee pot or copy machine either. Keep in mind, you may think these issues are "mild" but I don't know that.
If instead you came to me and said "I know I have been a bit forgetful the last few weeks. I made a doctors appointment to get it checked out." My response is going to basically be. "Ok, let me know how it goes, or if you need anything. If there's anything I can do to help let me know." These are good places to go. Now you have alerted me to the fact that your aware of an issue, and your doing something about it. For me, that closes the loop. After you get back from the doctor, it might be time for a different set of conversations, but for now I'm good. I would likely not even think of it again.
So telling your boss is important, but don't go in without a game plan. Admit a problem, and have a proposed resolution. Don't divulge too much, but at the same time be honest.
Some "cold" facts. Now I say these, not because you asked, but because you need to be aware of them if you do have a problem.
- In the US there is the "disabilities act". You should read up on it. The proper name to get you started is "Americans with Disabilities Act of 1990." However there have been many adjustments over time and the public "thinking" on how this act works is usually wrong. The act helps you, but also spells out some protections for the company too (in a kind of backward way). There will be some things the company can and can't do. But there will be some things the company can do. You really need to understand this act if you do have a problem. It does not protect your job in all situations!, more importantly in order to qualify, there are certian things you must do.
- Many states also have a/some "disabilities act(s)". A popular one in Florida is the FMLA or Florida Family Medical Leave Act, this law (well really it's a set of laws there is no real single act" Is essentially a guide on how to implement the Federal Medical Leave Act, with a few extra bits thrown in. Point being that your state, may have some extra laws to help, or hinder you. They must abide by the Federal ones though.
- In both the points above, "common knowledge" of the laws is WAY off. For example many people around here (not SE, here IRL) quote the "Florida medical leave act". There is no such thing. What people are usually referring to is the Federal Family and Medical Leave act, or the "Florida Family and Medical Leave Laws". If you think the name is confusing, try figuring out your protections and responsibilities are without help.
- And finally, I urge you, if your issue is a more permanent one, to re-evaluate your job/carrier. I know someone that worked at a call center, but had "disabilities" that kept her from being able to hear the phone, or type, or talk on the phone for long periods. The company would not risk firing her. But she also had nowhere to go. So they "stuck" her in "administration" basically doing nothing. Her job satisfaction was not high.