I think you have to look at things in the short term to start with, and not get bogged down in 'what if' for ten years ahead, or you will freeze your brain and not get anywhere!
He is miserable in school, not in a situation where he can make use of the academic or social opportunities that you would hope school was giving him, and you can see that he is a long way from happy.
A spell of being home with you, working towards goals like 'happiness' and 'coping with things a bit better' and 'finding ways to help his concentration' would be an investment in his future potential both for happiness, and for fulfilling his potential academically and in other ways. That might be something that a few months, or a year, or whatever, of focus and care, together with a diagnosis which points you towards support, could be enough to get him past the problems and back to a situation where he could go back into school and be happy there. Or it may be that school is just never going to be a positive environment for him. At this stage, you just can't guess.
I think it's always going to be a disappointment to find that mainstream doesn't fit your child, and to worry where that leaves you. But if you know that you can give him an environment at home where he can thrive, then surely it is better to give him that and work out how to move forwards from there, rather than watch him struggle with something that just isn't working.
You can view it as temporary, and you can have a goal of helping him with the things that make school a struggle. You can give yourself a deadline if that helps it to feel less of a 'no going back' decision. If you find things really haven't improved by the summer, say, and you feel that you are failing him worse than the school was, then he could go back into school. It doesn't have to be 'all or nothing' - a few months out of school isn't going to make it any worse for him than it is now, and could well make it better.