Marriages take hard work and effort from both sides. From what you've told us, it appears that you've given him many chances and you've put a very strong effort. However, sometimes all these factors still isn't enough.
Furthermore, there does not seem to be any progress from your efforts. So sometimes you have to do one of the toughest things. It's to let go. It does seem like that's the best approach at this point because there's no reason for you to suffer anymore.
You might be closing one chapter of your life, but that just means that a new chapter is opening. There's so much to look forward to, so focus on those things. Let the past be in the past! And you know that we're always here for you!