Everyone, good or bad, served a purpose in our lives. May he RIP.
You have done nothing wrong. fh will just have to deal. Sometimes we have irrational feelings when we love. But at the moment it is his problem.
Concentrate on you and getting through this. It is not as if you can forget or pretend he did not mean something to you at one point in your life.