In love with my best friend

Soooo I fell in love with my best friend about a year ago and we've talked about it and even though we both really like each other, it's not gonna work out. We've slept together a lot and have really good sex lol. I just don't know how long I can take it anymore because I don't wanna ruin our friendship but I also love him so much it's all I think about and he's all I think and worry about. Any advice?