You may need to get proper closure with your ex boyfriend.
The lack of that has kept your emotions in a state of confusion, thereby keeping you from being fully emotionally available.
It may be best for you to arrange a meeting with your ex and have a proper conversation about what happened and where his emotions were during the course of that relationship.
A proper understanding of what went wrong for him may give you a clearer perspective on that past relationship.
This would allow you to accept what happened and consequently release you from your emotional attachment to that past relationship.