Unfortunately, you can't really invest so much in other people. Time and energy is a major investment, just like money. And if you put so much into other people, if they decide to leave you, then you'll be devastated. It's OK to be really good friends, but don't subject yourself to limerence.That's what leads to this intense heartbreak.
In future, please be more careful while making friends. I've seen you make several threads about this before.I'm sorry for your suffering though.