Keeping a diary might be useful.
Also, talk to trusted friends and family..tell them how he has behaved. Warn them that he may try to use them against you. 'So going forwards I'd like it if you were careful not to tell him anything about me or my life as I dont want him in my life anymore'.
If they don't stick to that, it may be that you need to remove them from your life too. Unfortunately if we have had a nasty partner and get rid...we often start to notice similar people close to us. Eg: that we've accepted frenimies. Or that we have a parent that has always been abusive.
Having a partner treat us badly and accepting it, lowers our boundaries too...
Hopefully you have good supportive people in your life though. But just be prepared to walk away from anyone who, knowing how he has treated you, advocates for him in any way. Tell anyone like that clearly 'I will not be getting back with them so you can knowing that, be a supportive person to me - or, there's the door'.
Don't hide secrets for him anymore, tell those who matter to you how he is and why you're done.
If he harassess you, speak to the police. He has no right to contact you if you don't want him to. Womens Aid are also available to talk to.
You can block contact with him on everything for now. And you only need to talk to him when the baby comes, IF you want to give him the opportunity to pursue contact. He doesn't have a right to be at your scans or at the birth.
Let him talk shit to whoever he likes. The people who care about you, won't buy it.