Your feelings are valid, it's okay to miss the good times but hate the bad. I think it's important to hold on to the good memories, knowing that time of your life in over; but also take the bad moments and remind yourself you're worth more than the way your ex treated you. I hope you've been able to get support for this in recent months.