I have to be a little dubious about the idea that the mother bear killed the cub with the specific and knowing intent of "ending it's suffering before I take myself out.". That strikes me as some classic anthropomorphizing. The same can be said that the mother ended up killing herself as an express and intellectual act of suicide.
It is however quite easy to believe that the mother knew her cub was trapped and in distress and, in the sad process of doing the best she could to free it, ended up killing it. Afterwards she threw herself against whatever barriers held her and in doing so ended up killing herself.
The latter explanation, though not nearly as emotionally dramatic, isn't really much less sad. This procedure carried out against these animals (for bile? for their f'ing bile?) is barbarous in the extreme.
There are animals that will kill their young if they fear they are in danger. They do it in a manner that would be less painful than being devoured alive.
I have never run across a credibly sourced ethological account of the kind of infanticide you describe. (and perhaps more to the point certainly nothing close involving an ursine species) There are several examples of infanticide where when conditions may not be favorable for long-term survival might be problematic or counterproductive the young can be killed by their mothers. (I'm specifically talking about mustached tamarins) It's assigning this calculated euthanasia aspect that just doesn't square with any scientifically supported study I've seen.
If you have a source that does support this contention I'd like to see it. (and I'm being serious, not condescending)
Does seeing it first hand count as a source? Having owned dwarf hampsters, this is a common practice(I know it is in other animals as well). You're not suppose to disturb the mother while the babies are still defenseless. She fears danger from outsiders. Even noises can cause this reaction. There is a good chance the mother will die trying to defend him which means they'll suffer anyways. So she does it herself.
Anyways, I ended up cleaning out a cage and came across a babies body with a severed head. I don't believe this was done out of not being able to provide for it but out of fear of being endangered after I had checked on the mother and realized she had babies. My presence freaked her out.
I just know that some animals will kill their offspring if they feel they are in danger and think they are saving them from a more painful death.