Well, after YEARS of trauma and abuse, one just simply trusts someone who says "I love you", very believable. I'd say Sanji started taking it seriously only after Luffy came for him to WCI.
And even if you know you're loved, with self-esteem issues you keep having impostor syndrome and doubt whether you're worth it, and maybe you're still a fraud and once it's clear to everyone that you're a fraud, no one will love you anymore. Totally not years of therapy talking here, damn I can relate to Sanji so much
Not only abuse, but think about the two most significant people in Sanji’s life and what they did for him. His mother sacrificed herself so he could remain human, and Zeff sacrificed his dream, which, in the world of One Piece, is another form of death, all for Sanji. His experience with sacrifice is one of finality, all stemming from love. So, his understanding of love, death, and sacrifice is tied to those experiences, alongside the subconscious lack of self worth instilled by his childhood.
What this creates is a character who sees more value in dying than in living, someone who is quick to throw himself into harm’s way without a second thought because he views himself as disposable. Sanji is willing to throw his life away for the Baratie, without hesitation. He reprimands Zoro for putting his life on the line because it means risking the possible end of his dream, while disregarding his own goals and aspirations. Telling him to "find a new cook." His first thought when faced with the possibility of becoming emotionless is death. He calls up Zoro and tells him to take his life. While other characters put their lives on the line for others, none of them do so with such self apathy. Sanji is too quick to embrace the ultimate sacrifice and finds his true value in that choice.