I've had suicidal thoughts. That's not something to say, at least not if you don't want to paint your friends' faces a particular hue of alarm. Concern is beautiful, in the wake of voicing that particular fear out loud. The most frightening part of the thing is that you can't rationalize someone out of their existential crisis; it's a mental state of despair to such a degree to make an escape of that magnitude seem like a good idea and, honestly, you can't logic your way out. The only real way to help someone make their way out is to empathize; you can't lead someone out of a place you've never been.
Is it selfish to be depressed? Dying and leaving the living to live in spite of your death certainly is cruel. It's not utilitarian. It's not in service of the greater good unless your suffering exceeds the suffering your death would bring to those who love you and are dependent on you, though no one ought to be expected to think that way when they're in excruciating pain. Stress can literally eat someone up inside. Pain shouldn't be permanent, but it can feel like it is. Heartbreak can really tear you apart, make it look as though there's no light at the end of the tunnel.
There's a bravery and a strength to continuing onward when you don't feel like it, when you put on a smile when you feel like crying, but there's a foolhardiness to not feeling the way you're feeling in front of your friends and family. It's an honest conversation too honest for most, but it's a dialogue that ought to be had. If you can speak in concrete terms, carefully, avoiding being an emotional terrorist, do so. Never threaten it; never use it as leverage in a break-up; never use it as a ploy for attention; speak up when you're hurting. You need to admit you're sick to feel the need to see a doctor; psychological wounds are less evident but just as important to treat. Talk to someone you can trust with soul-deep conversation; also talk to a therapist, a doctor and/or a religious leader when your feelings are crippling. The desire to close up and isolate will be even stronger; don't. Go out, see friends, call your family, volunteer at an animal shelter, thrift at Goodwill, watch a good film and eat a meal outside. Do what you need to do to feel like getting out of bed in the morning. It can feel like a lot, and it is, but keep fighting the good fight. If God's love is not available to you, the warm love of good friends and family should be enough.