How bad is it to stay in contact with your ex?

Ok so this seems kinda complicated, at least to me. I don't really have a lot of friends, and even less that I can talk to about everything troubling me, namely my best friend and, up until recently, my now-ex-boyfriend. Now I know I'm clearly not over anything I feel/felt for him, but I have trouble not talking to him at all.
1. We broke up as peacefully as break ups can be, realising we just weren't fit to be together this way
2. I'm in kind of a bad situation overall right now. I've had trouble getting along with my parents/family for a long time now. In my training to become a teacher I got in a very bad mental place last year and had to take a break and am repeating the year right now which is stressing me out a looot. And all this stuff I was able to manage for myself with him, talking about it, staying with him for a few days when it was rough at home and so on. And he was basically the only one I could really talk to in depth about all of that.

Now I'm really scared to stop talking to him and starting the "healing"-prozess or whatever because I konw it will fuck me up real bad, and I don't have another chance in the teacher-training-stuff so I can't afford to fail this year (and that alone is stressing me out enough).
So yeah, I know it's not healthy to just repress that stuff, but I honestly don't know which is the lesser evil, staying or leaving completely...
How bad is it to stay in contact with your ex?
Add Opinion