This is so, so sad. You certainly deserve to be treated better after 27 years of marriage. Of course you are depressed. The situation is depressing.
To call this behavior a “mid life crisis” is to minimize his behavior. The man is having an affair. He may have been unhappy in your marriage for some time, but instead of talking to you about it or going to therapy to try to improve things, he has run away from the problems and run into the arms of someone who is very willing to have him. To me, this isn’t honorable or fair or even wise. Instead of manning up and dealing with the issues in his marriage, he is betraying his wife and family and he is avoiding taking any responsibility for his share in what went wrong.
To make things worse, his family and friends aren’t being real friends to him. Instead of supporting him in being a man, they are cooperating in his return to boyhood.
I’m sure this situation is complicated — only because affairs always are. It may be that the two of you didn’t recognize or avoided issues between you. It may be that the only way he saw to change the situation was to do something as radical as flight. It’s also possible that he is in a manic state. I have no way of knowing without talking to him.
What I do know is that you can’t make him return to your family. But what you can do is take care of yourself and your children. I strongly encourage you to get into some therapy for yourself. You need to be talking to someone who can hear your whole story and who can make some concrete suggestions to help you through this. Your husband may be willing to join you for some therapy sessions — if only to talk about how to stay connected to his children. But even if he doesn’t, you deserve help with the depression and a place to talk about what to do next.
I wish you well.