He said he wasn't sexually attracted to me anymore
This statement is HUGE in its implications. As much as men will deny it, most men need sex for romantic love, most women need love to enjoy sex. Note I said "romantic" love, we can certainly express non-sexual love but to be in a romantic relationship, I think most men would find good sex essential. Sex is a barometer for the relationship and a vicious, downward spiral starts as the woman withdraws from sex due to a lack of love while the man withdraws emotionally due to the lack of sex.....
There is no answer to the "seven year itch" conumdrum except to know that we all KNOW at a certain level, when a relationship is truly on its deathbed. Speaking from my own experience and the similarity to what you are going through, it might be time to consider alternatives. I hung on to an empty relationship simply because I was afraid of being alone and vulnerable. 3 years later, I was married to the love of my life, my soul mate and best friend (now 7 years from now....ha ha ha....dont wanna even consider that! )