I know you are feeling blue right now. Remember how very human this feeling is and also how important for long-term growth. Though I think you're setting yourself up well to turn a corner, especially with the move. What's funny is I've been thinking of proposing a move for you - this feels like a great call.
As for the part-time gig, I think that's perfect. Seriously, enough to keep you energized and rebuild a routine. But not too much where you don't have room to plan your dreams.
What's possible for you with the job and the new apartment ?
As for your constant thoughts of "D" [insert first initial of ex ] - continue to be gentle with yourself. It takes time.
But, notice - Where are you still playing victim?
Since you're in that interesting phase of continuing to (metaphorically) touch the hot stove, now is the time to get serious about re-wiring your brain. Do everything in your power to re-incentivize yourself and take your power back with gusto like someone you deeply and uniquely admire (i.e. George Carlin or Chrissy Tiegan).
The image that always helped me was thinking of "a dog going back to its on vomit." Seriously gross but helpful. Every time you think of her you need to associate it with visceral disgust and maybe laughter and disbelief, not pleasure.
If I were you, I'd focus on the move, the new job and really start to dream of new horizons.
How can you focus ONLY on new stuff for awhile? How could this help you?
Create a new space that's all yours. Go places you've never been. Listen to new music you've never heard. Depression comes from looking backwards, not forwards. Do everything in your power to look forward - truly you must fake it till you BECOME IT.
If I were giving advice to my former heartbroken self, I'd tell myself to begin showing up differently physically, almost as a form of trickery to my internal self. Dress the way you would if you felt free, cook the way you would if you felt free, exercise the way you would if you felt free ... This will help recalibrate you.
And if all the above is too much, focus on your two new things (job + apartment) to start this process! How do these new possibilities excite you? Keep that top of mind.
Be gentle. Take heart. You got this.
P.S. Please replace his/her name with just the letter "D" - in your mind, in convo and in writing. Can you do that? That name is a loaded gun. Put it down.