I won't give too many details here, but I have been through similar and know how you feel.
As the poster above said my DF was the "perfect" partner, loving, romantic, great father, do anything for anyone, particularly dependable etc. and we were looked at as one of the happiest couples around, then one day he just left.
Not for another woman, he just decided I wasn't for him and right away joined up to dating sites and acted like I had never even existed. Like the poster above, he gave absolutely no warning or even any hint it was coming and after he did it (maybe because of guilt) he turned into an absolute shit too, also stopped paying the bills overnight and I also ended up briefly homeless with kids. I'm still very slowly picking up the pieces almost a year on.
I know how you are feeling. I think the best word is "shattering" where everything you felt your life was based on and was most real and most important disappears in a moment. I understand the shock and horror as you realise you're under attack from the one person you trusted most.
I am so sorry sticky. I read how many times this sort of thing happens and despite knocking my head up against a brick wall trying to psychoanalyse I have never gotten any further with it. The best answer I have is that as someone else said, some people can just compartmentalise like that.
For whatever reason they are able to decide what they want and just do it - completely disregarding the casualties and the pain they cause to the people they are supposed to love.
As for knowing they are capable, I honestly sit here a year later and still almost struggle to believe what he did and how he did it. I just didn't see it and neither did anyone else who knew him. Don't pick yourself apart like that.
In terms of advice, I wish, if I could have the time back that I had fully understood from those first weeks that the man I thought was my best friend and the love of my life was now my enemy and I was under attack. I should have defended myself financially and emotionally but in the shock I failed to do that. While I was busy telling friends and family I was sure he'd be home soon and I "knew" he would not do this, he was busy badmouthing me and telling people he was amazed he had endured me for so long. He had made steps to emancipate me financially and because I did not understand he was gone for good I let him take everything - believing deep down he would be back next week, next month or soon.
Also, please don't look to blame yourself. The first reaction when you love and trust someone and they behave like this is to genuinely believe something you did must have caused it but trust me - it didn't.
People can hide in plain sight. Your DH is capable of incredible cruelty and selfishness and it's just something you didn't know before because being nice to you was in his interests. It isn't anymore.
The good news is, you will come out of this stronger and you can have a new life with someone else who (although you don't realise this yet) is deep down a better man.