many years ago i used to have panic attacks, so I sympathise with how you are feeling. I read a book by Dr. Clare Weeks which explained exactly how panic attacks worked, and how to manage them.
Basicly they are caused by a sudden rush of adreniline which the body produces to fight or flee in situation you are afraid of. Because the body can only produce ,and flood you with a limited amount of adreniline, you just have wait until the adreniline has done it job, "shaking, sweating, dizzyness, panic etc. This is time limited because the adreniline has to be used up, and the body has to produce more. before you can have another attack.
Just fearing an attack can trigger on.
I was determined not to stop me getting on with my life, so I did everything i wanted to. If I was in a public place, then I would stop and pretend to look in a shop window or sit on a bench until the attack (or adreniline rush) went away. If I was in a supermarket, I used to lean on the trolley, to support my shaking legs, until it passed.
It took me months before I felt in control, and Ive not had them for years.
Go to the funeral, sit on the bench, if you feel a panic attack coming on just sit there until it passes. Which it will.
No one will notice because of their own feelings and grief.
Good luck