is suicide hedonistic?

hedonism can be simplified down too maximum pleasure minimum struggle/pain (not necessarily in physical sense but yk) if for example someone has a terminal illness that’s painful and debilitating, suicide could be seen as the hedonistic act. what about denying care to end life sooner?

now what if we take these same ideas for someone depressed, they don’t look forward to life for whatever reason, and don’t want to get better. would suicide be hedonistic? i would say yes, ethical hedonists (which sounds closer to utilitarianism from my small research) might argue no using the hedonistic calculator you could argue that the grief spread to others out ways the pleasure, or rather lack of pain of one person

"There is but one truly serious philosophical problem and that is suicide."