They are called soul hearts, and simply serve as a temporary HP boost, once you lose a blue/black heart, it's gone forever. Note that when you take damage, it will always subtract the damage from the blue/black heart(s) first.
According to the wiki, the only item that seems to be able to raise your stats above the maximum is The Sad Onion, which doubles the firing rate no matter its current value. I have very little personal experience with that item, so I can't confirm or deny this.
The stat that I find easiest to max out is damage, as I've often managed to get quite a few damage enhancing items in a single run (which would have put me over the maximum looking at the bars in the pause screen). I always seemed to hit the same cap, no matter how many damage enhancers I picked up.
In light of the above, my previous version of this answer indeed states that the item is useless once damage has been maxed. Further research, however, proves that I was mistaken. To test this, I played with Judas, picking up both The Pact and Pentagram, which maxed out my damage. I then engaged the boss Gish. Here is Gish's health-bar before I started measuring damage:
I then shot Gish three times, bringing him down to this:
The difference was 11 pixels. Then, I used the Book of Beliel and shot him three more times:
This time, the difference was 15 pixels.
So as a matter of fact, the Book of Beliel can and will take you above max damage.
Sadly, this experiment doesn't give a single conclusion about the multitude of other ways that one may try to raise his stats past the maximum, but strictly speaking, the answer to your question is yes.
Best Answer
Strictly speaking, whenever you lose all of your regular health you will die. However, this is not always easy to do when you have soul hearts. I'll treat each of the cases you listed individually:
Blood donation machine: On levels before the womb, blood donation machines do half a heart of damage. You'll start by losing regular hearts, until you have half a heart left, and then you'll start losing soul hearts (Source. I haven't felt suicidal enough in any of my playthroughs to actually try this out):
Starting at the womb, using the blood donation machine will use up a whole heart, so if you only have one heart left, using the machine will kill you.
Razor: This acts more or less like the blood donation machine, except the loss of regular hearts scales up more quickly (1/2 heart in basement/caves, 1 heart in Depths, 2 hearts in the Womb).
Making a deal with the devil: While making a deal with the devil is slightly different than the above as it will actually cost you heart containers instead of causing you damage, you will still get killed even if you have soul hearts left after the deal. Some consider this to be a bug, though that is debatable (see the bugs section here).
And of course, all of the above doesn't really apply to ???, who has no regular hearts to begin with, and cannot gain them.