Most friends I know from primary school eventually had to end up parting ways with their friends when they graduated. Still, even if your friend goes away suddenly, you ought to be able to support them.
I get that feelings do things you don't intend, but if the heartbreak is too much, just get some distance and heal up for a while.