I actually saw some of these in walmart, just the other day. They kept them with the Living Trends succulents and cacti. The blue color is just paint or dye. They had the same type of cactus painted many different colors. It's like when they glue the bright plastic flowers on top of the little bulb like cacti and people buy it thinking it's real and it'll keep blooming like that.
I don't know what kind it is and Bamboo might be correct. From what I saw, the little green fingers are just really weak growths that tried to come off of the blue painted parts, but didn't do well, thanks to the poor lighting and water on a walmart shelf.
As for fixing it, the first thing I'd do is to repot it with appropriate soil. I see a lot of cacti and succulents that get potted in something like sphagnum moss, because it holds water and they want the plant to live as long as possible on the shelf till someone buys it, regardless of how healthy it is when they do. It's in the vein of the little succulent/cacti pots you can buy that have several varieties and have white rocks on top. They glue the rocks on top so they don't fall out during shipping, but it restricts the plant growth and prevents water from getting down to the soil. Another example are orchids in decorative pots. You'll often remove them after blooming and find they're actually in a tiny pot that has been stuck in the decorative pot and had filler stuffed around it. It's pure marketing and they're trying to sell as many as possible with no regard to the plants welfare.
It's possible that you have good dirt, but even if you do, chances are that it's either hard packed or has had all the nutrients leaked out. I like to buy a cactus mix and then work in some extra perlite. I keep a small bucket of the mix for planting new cacti/succulents. I would put on some gloves, gently remove it by squeezing the plastic pot, remove what dirt will easily come off without damaging the roots too much, and then repot in good dirt. You may have to prop them up with a chopstick or something.
I also think you have and opportunity with the piece that's almost broken off in the picture. It looks like it's broken off pretty cleanly at a joint and has already dried. I'd snap it off, prep another small pot and lay it on top of the dirt, preferably so dry end is either slightly under the dirt or in firm contact with it. If you use a squirt bottle to soak the top layer of soil down anytime it looks dry, you'll eventually start seeing little roots coming out of it. I've been doing a lot of this with succulents recently. I almost lost some Christmas cactus cuttings, because I thought the roots were going deeper than they were. I was letting it dry out a little between waterings and one of them started to shrivel. I checked it and found the roots were very, very shallow. After that, I started misting it every day and it started to flesh back out. It's now growing well and has several new 'leaves'.
The cactus bulb will provide a lot of the nutrients and water to get the roots started, but once they are you'll need to pay close attention to it. Once grow out pretty well, you should start to see baby cactus coming off of this and growing upright. I would wait for that. You could always plant the bulb upright, but if you do, a lot of the new babies come out from the base and they'd probably be buried too deep. Good luck and I hope this helped.