Am I wrong for feeling this way?

I’m currently have been with my boyfriend for almost two years and we have our ups and downs like everyone else. A couple nights ago I found that my ex passed away and I took it very hard. I cried all day and nights, I had to leave work early. Death is heart breaking in general but suicide is a big pill to swallow. I eventually told my boyfriend why I have been crying (we live together so I can’t find it for too long). He wasn’t upset but he just didn’t understand why I was emotional or what business I had with my ex. My ex and I were emotional toxic, we loved each other but the fights and the trust issues were bigger than us. Of course we went out separate ways but remained in contact ever so often. He’s always gonna be that ex i can be truly be friends with and wish him all the happiness in the world. I last spoke to him in February and he sounded happy. To be clear, my boyfriend was aware he wasn’t upset as long nothing else happened; nothing did. I’m still in shock and so sad that he’s no longer here. I love my boyfriend very much and I’m trying to consider his feelings, before him my ex was the one I can run to if I was ever in danger or needed a friend. My boyfriend is that now but I’m so sad at this time about all this. Am I wrong for feeling this way? How do I heal from this?