Exsanguination
When the heart does not get enough blood, it can start beating in ways that are not normal.  When this happens because of exsanguination, it usually means that the patient is close to dying.