I hope you don't mind me saying, that a man who is nearly 30 dating a 17 year old is a bit "wrong" if you know what I mean.
I know the breakdown of your marriage must be horrendous especially as you were together so long and from such a young age for you, but I feel that you have so much else to offer. I don't know much about your situation and you life but do you manage to get out much and see friends?
I was wondering if it would be possible for you to maybe start going to an evening class or even singles nights? Exercise classes (Zumba is supposed to be good) and just coffee with friends. Try to get a bit of YOU back.
Sorry if this has all been said already. I usally pop on here when I have a few spare seconds so not long enough to read 558 posts (you popular girl!)
He must have left you feeling so awful about yourself (what is he blaming YOU for exactly?) but at 39 you are still very young and won't have lost your looks or anything silly like that which I suspect he might have said to you.
He is the one with the issues here not you. I really want you to be able to get over him (as if it were that easy), stop worrying about his midlife crisis and start building a new life for yourself.
It does sound to me that the midlife crisis isn't the main problem here anyway. Yes he might be having one but that wouldn't FORCE him to be horrible to you. That comes from him. Also if he was dating a teenager when he was nearly 30 then he has always had these issues. It's not your fault, you were just unlucky enough to end up with him rather then someone who would love you for who you were and love your 30/40/50 something body as much as your teenage one.
I am speaking from a bit of experience here with the older guy/younger girl thing and when I got to the age the guy was (we had split up by then) I couldn't believe how my perspective changed which is hard to see when you are that young. As a woman then in my late 20's I couldn't believe that a man of the same age that I was would be interested in a girl of 16/17 as the difference is huge. They looked so young that is seemed pervy and like it should be illegal! And acted so young! And had so much less life experience which is so important to how you relate to someone. I felt (and still do) that a guy that much older would only go for a girl so young for either sex (taking advantage in my opinion) or because there was something really quite wrong with them which older women just wouldn't put up with, or a complete innability to relate to women of their own age (again warning bells there).
Sending hugs your way.