I realise this post is a month or so old, but I just came across this thread and...oh wow... I really feel for you in your situation, myself being somebody who suffers from heart problems .. I know how it can be overwhelming.. the fear and thoughts that come with such ailments.
Like you, my thoughts turned to bigger and grander things than just this life that we see. I can only say that from my side of things those thoughts gave me a certain calmness. Breathing exercise and control can work wonders too for calming a dangerous heart beat. I really hope your finding some level of comfort and that things improve for you!
Best wishes :)