Possible Panic Over Major Gambling Debts?

My boyfriend broke up with me 2 months ago and it came out of the blue and without warning. Then 3 weeks later he told me that he had gambling debts of 40k and had been seriously gambling for the previous year. He has been gambling for years but his salary increased quite a bit a year and a half ago and I think this is why he began to bet more often on horses and then built up this debt. On the night he broke up with me he had bet quite a lot that week and in retrospect he seemed to be in a panicy state. I had no idea about the gambling problem at the time so I was totally confused but his behaviour has made more sense when his problems came to light.

He does still want to remain friends with me but its like theres a wall up now as i think his mind must be occupied by all the debts and gambling issues. So my questions are is this kind of behaviour typical after great losses and maybe the realisation that he would need to quit or continue and also is there a chance that his mind will settle over the next few weeks and he may want to resolve his relationship with me as he was quite tactical when I suggested us trying again (before I knew about the gambling) as if his mind was so occupied elsewhere. I'd just love to know if anyone could shed some light on this please as I've been in a state of shock over the last 2 months between the breakup and the deceit of the gambling. Thanks.