The Bhuddist practice of metta meditation, or loving kindness meditation, is a great way to comfort yourself. It is a mindfulness meditation practice. I use this form of meditation to obtain comfort when I'm in a lot of pain. I especially like this technique because it enables me to bring comfort to myself when external forms of comfort are not available. It may be used to seek comfort for any form of misery - and it may also help with growing compassion for others in the world.
You begin with meditation focused on loving and being kind to yourself. For example, I say "may I feel loved, may I be healthy, may I be strong." I may need to do this for days or weeks where the meditation is focused on comforting myself. This focus on feeling loved will lead to a sense of comfort. When I am comforted, then I continue to the loving kindness meditation to grow my compassion. I ask that my family be loved, healthy and strong. Then when I am even feeling stronger and ready I grow the circle to neighbors and community until finally I am able to make my circle the world. When the pain grows again I may focus the circle on myself again. Remember you have to take care of yourself before you can take care of others. If you don't feel comfort and you are not at ease, focus the loving kindness meditation on yourself until you are ready to try to spread the love and compassion again to others.