Is there a nice way to tell someone they need more friends?
I have a relative who I don't want to cut off, but it's obvious they need me more than I need them and it's exhausting. They want me to drop everything and spend time with them at a moment's notice, usually eating out which is super expensive, and they constantly have mental health crises and text me that they "need" me.
I can say no to them, that's not the problem, but they haven't gotten the hint and are just as clingy years after years of it. It's really unhealthy for me to be their only friend when I don't feel the same way. Is there any way to encourage them to expand their social life without sounding like a dick? I have no social grace and sound like a dick a lot.
I love what everyone else already put. In addition, I would recommend a few things.
Switch to almost never helping them right away, but let them know to call a helpline if it's urgent. For example, if they call or text, just say "I can't talk right now, I will get back to you in x time. In the meantime, if you're in a crisis, you should definitely reach out beyond me to the mental health helpline at [enter helpline phone number for your country]". And no need to explain why you can't talk now. I had a relative who had a mental health crisis (but not same situation as your relative at all - this one wasn't needy) and who realized on their own that my genuine efforts to help them were not effective, and informed me they would reach out to a mental health helpline, which I said was a great idea. I don't think it's at all heartless of you to refer your relative to a mental health helpline, and they may well take your advice if you phrase it as they get to go over you or beyond you. (Sort of like customer service escalation).
If this person demands what you've been doing with your time or why you're busy, this is a red flag and it's not any of their business. They are not entitled to your time, that is yours. However, if you feel you must answer, then say something like "heading to grocery store" or "preparing stuff for my [work/school/hobby group]". Always have a stock of replies of things you could conceivably be doing. Never be at a loss or say you're doing nothing.
Stand firm, set boundaries and don't worry about whether you're sounding like a dick. It sounds like your relative's lack of boundaries are a bigger issue than their mental health honestly.
Just say no to eating out. If they push, just say sorry, inflation is a problem and you're looking to save money now. Try not to see them in person if at all possible, do voice chat on phone or whatever.
Encourage them to join a community group to be around others. Many church groups are extremely good at this even if your relative isn't religious, it needn't be a Bible Study or anything that serious. Some church groups are about going out for coffee with a group of similar-age people and are more geared towards those who aren't already in the church or haven't had good church experiences in the past. If you don't have a starting point, leverage your own network: ask someone in your friend group who is Christian what would be a good church and group for this situation. If they don't know, ask if they have anyone from another church they could pose this question to (a lot of Christians have contacts who go to other churches). Present the info to your relative (e.g. it meets at x place at y time, here's the email of the organizer, you should make contact with them).
I had a similar problem with a friend who was demanding of my time and attention years ago. The best thing I did was to seek counseling for MYSELF (yes it takes time and money but it's worth it). After only 3 sessions I had the skills I needed to handle the situation and establish boundaries.
Ultimately, if none of the above things work, I'd recommend being brutally honest with the person. Usually ppl who don't respect boundaries will actually appreciate the honesty if not the end effect. Something to the effect of "I'm sorry you're struggling, and I can help once in a while, but I can't be the only person in your life for this because it takes up too much of my time. My hands are already full. You need to get out there and form more of a network of people in your life, especially since I'm often not available. If you don't have that, you might find yourself feeling very alone when I'm not available." You don't need to say what your hands are full with, or why you're often not available. Make it clear that the consequence of them not having a network is happening to THEM (feeling alone when you're not available). Up until now they might have thought the consequence of not having a network is that they get to call you all the time. They could still call you but I recommend not answering, or not right away, so they really understand that this consequence is falling back on them. It's not on you.