We would all prefer to stop working. However unless you are independently wealthy, you have to work.
What I have to say is going to sound harsh to you. But you really need to think about it.
As someone who has battled depression for almost 40 years, I say to you, stop using it as an excuse. In over 30 years in the workforce, I have missed a total of a week due to depression. So things are harder than they were before the depression, big deal. Lots of people have challenges to overcome. You just keep on trying no matter what, persistance is the key. You fall, you get back up and try again. Giving up will ensure that your life is harder than it needs to be. Yes your performance will be degraded at first, so what! Accept that and move on and keep trying. Giving up will not help you in any way, shape, or form.
Yes I know it is hard to do things when you are depressed. Accept that during a big depressive episode, you will have to try harder to do things. It is the price of the disease. But you know what, someone with arthritis has to try harder to do things. Someone with with cerebral palsy has to try harder to things. Someone who just lost his spouse has to try harder to do things. Someone who just got his leg blown off in a terrorist attack has to try harder to do things. There are lots of people trying harder.
If you haven't gotten treatment, then do so. It is hard to get out of the cycle without some professional help and often you need medicine. Once the drugs have kicked in it gets easier to get out of bed in the morning, but it never goes away. You have to learn to cope and keep on going. The most helpful treatment I got was from a Behavioral Psychiatrist who taught me how to do things even when I didn't feel like it.
Depression is a disease. Millions of people successfully work with it as others successfully work with other chronic diseases. Dealing with it daily isn't easy, but life isn't easy. There are no quick fixes to chronic diseases, you have to have the intestinal fortitude to keep going even when it is painful or difficult or you don't want to. The single worst thing you can do is stay home being depressed. That will make your depression worse. It will make your life worse.
Now as to work, if you trust your boss, discuss the problem and what you are going to do about it. (Be careful, a bad boss may get worse if you tell him.) He may require you to take the medicine to keep your job or to see a therapist. In the US, he may even make an accommodation by restructuring your schedule to allow you to go to the therapist during the work day. It is also frustrating as a boss to watch someone's performance degrade for no apparent reason. So he may feel it is better to know what the situation is, so he can rearrange deadlines and schedules and help the person get the help they need.
I have found most bosses will be willing to help a good employee through something that will temporarily degrade their work if you discuss the problem openly and talk about how you are going to work around it and what you are doing to ensure the problem won't affect your work forever. After all if you were a manager, would you rather know that someone is going to take 20 hours to do something they used to be able to do in 10 due to a personal situation or would you rather be surprised when the deadline is missed?
You might even want to be assigned to easier work until the meds kick in. Give the tougher tasks to someone else for a bit. (I will warn you that people who are already poor performers will get less sympathy or slack from the boss. Why should he carry someone who won't be good even after the treatment kicks in?)
I have found the support from my bosses has been key to working through a major depressive episode (or other life issue like the loss of a spouse). They can't help unless they know. But I have also carefully chosen my bosses to be people that I could trust and I make sure to overperform when I am not in a depressive episode.
A developer has some options that other people don't have. If you don't have a policy of code review of all code in your office, then ask to make sure you code is reviewed while you are still in the major episode. You will probably catch some stuff that would have created problems that way. Or ask to spend some time pair programming, it is harder to just stare into space all day when you are pair programming.
It will take about a month or so for the meds to really kick in, so ask for a couple of months of grace before your performance will start to improve. Then if he gives you the slack, appreciate it and do your absolute best to justify his trust that you will be able to perform well again.