Really sorry about your relative passing away in such traumatic circumstances. It is very understandable that you wish to make a complaint and sometimes the easiest thing is just to phone the hospital and say you wish to make a complaint. The alternative is google HSE making a complaint and they have a form to be filled in.
Maybe reading your post it is not that you want to complain so much as to understand what happened in the emergency department and why you got such bad news and then the exact opposite news 20 mins later.
And hospitals are not keen to sometimes go into technical details as to why they someone is dead or not dead. I am no expert but usually there are checks to determine death by several staff members for reasons such as this case. To certify death the hospital has to go through a process, maybe heart beat or brain activity etc., I don’t know the details. But hearing this very close to death, can be traumatic for the relatives. As I understand in a heart attack parts of the heart dies and the heart stop beating, and the brain is starved of oxygen and starts to die as well, so even despite the best efforts of the hospital staff getting the heart going again may not be enough. And perhaps your relative was young which is why they felt it worthwhile to keep checking and then to operate to improve chances of life.
I know when my Dad passed away in hospital in 2019 he stopped breathing and the nurse checked for a pulse and agreed he was dead. Probably a doctor did another check, but my Dad was 100 so I would have expected no extreme measures even if they had detected further heartbeats. They probably would just had told us that he was actively dying, and it would take another while.
Again I am really sorry you had this experience, and the trauma of what happened is really staying with you. It may be that your questions to the hospital will answer your questions but you may find that the staff who were there on the day are no longer available to answer questions and that the doctors who may speak to you may be very defensive, and not help a lot.