2 Cor. 1:4: "...who comforts us in all our affliction so that we will be able to comfort those who are in any affliction with the comfort with which we ourselves are comforted by God."
It has been said that "you can't give what you don't have;" this thus explaining why we must love ourselves before we can love others, and presumably in this case why we must be able to comfort ourselves before we can comfort others. But that is an unBiblical interpretation of a potentially true statement; "you can't give what you don't have" is true indeed, and we cannot give to ourselves what we do not have within ourselves any more than we can give it to others.
What's more, Scripture never says "love thyself." We already love ourselves too much; learning to love myself is learning to be selfish, and that doesn't help anyone. That's not really love at all.
No, we cannot give what we do not have; we must ask it of God, and as He loves us, we can love, and as He comforts us, we can comfort.