The most important thing you can do is just be there. Email, blog, social network, however you're connected try to reach out fairly often. Do whatever it is you normally do in your friend's life.
Listen. Encourage them to talk. Know how to handle difficult conversations. Sympathize as much as you can.
Go light on advice, but if you think of a solution, you can present it with "You might consider ..." or some other oblique opening.
Many ways to help friends through hard times work fine online. Think about what you're good at doing, and do that. I happen to be good at research, so I often help by looking up resources that I can find in a few minutes but would take many people hours to track down.
Resources often rely on body language and other physical interactions. You can carry over physical cues online, you just have to write them, and if the other person responds in kind, it's very similar to the facetime version. *hugs offered* *hankie* etc. For example, this week's Cuddle Party has a lot of physical interaction, not as much conversation. This is a new feature, inspired by some folks melting down in Hard Things and that turning into a cuddle pile.
Some people get vicarious pleasure from descriptions of touch. They'll go to things like "Touching Moments" when they feel sad. If your friend is that way, you can describe what you would do if physically present, and that may help.
Verbal techniques translate to text with very little loss of signal. If you need to replace voice tone, smileys work well. Those also convey facial expression. Active listening and other counseling skills can help. Validation confirms people's feelings or experiences. This is enormously useful for fixing certain types of problems such as gaslighting where other people might be undermining your friend's perceptions.
I Messages and 3-Part Messages are related. They express personal feelings and effects. It's a straightforward way to put emotion into words. If you do it, your friend may do it, and that helps with their expression so you have more to go on. Mirroring and rephrasing reflect the speaker's thoughts and feelings back to them, reassuring them that you heard what they said. This can help them open up more.
Try to create a safe space for your friend to vent about problems, feel emotions, and be accepted. I have found a lot of useful cartoons online that illustrate problems people often have. Some of my go-to images on this topic:
I Made You a Nest
What Anxiety Feels Like
Help vs. Helpiness
Laziness vs. Depression
Living with Anxiety and Depression
I Want to Talk
Tell Me What Hurts
Sometimes it helps to choose a picture of a place to "be" together, like the cuddle room I made. Or a meadow. Or whatever. People have different blog metaphors that influence how they shape cyberspace.
Similarly, sending cute or beautiful pictures can make people smile when they feel down. Nature art makes people feel better. Recipes for comfort food can be healthy. Jokes make people laugh, as do funny videos. Use whatever stuff you think they'll like. This is one technique that works better online than in person. When you're out with a friend, you rarely have a video of meeping otters when you need it. Online, it's just a quick search away.
There are many ways to send positive energy such as light, positive energy transfer, channeling over distance, funneling, stone or candle magic. You can describe it online. You can do it with visualization. Among the easiest is to link two items together -- like matching stones or halves of a seashell -- then send one to your friend. Hold yours and think of them. You can also send a fuzzy pillow, blanket, stuffie, etc. to cuddle.
You can send a wide array of goods and services long distance such as meals, snacks, flowers, singing telegrams, maid service, babysitting, and so on. There are many ideas for long-distance gifts. If you know someone's favorite shopping places or at least a category of what they need, gift cards are great. Think of stuff you would do or give if you were there in person.
It's also important to offer help without pushing. It's okay to persuade but don't pester. Think about the spectrum of influence to coercion. Learn how to give advice that actually helps.
Basic counseling skills may help. Use conditionals. Present options. Leave decisions to your friend.
"You might try ..."
"Perhaps you could ..."
"Is there another way to ..."
"Might it help if ..."
"Could it be that ..."
"Have you considered ..."
"What about ..."
"Some people find that ..."
"Here is a list of possibilities ..."
"How is that working for you ..."
I hope this helps.