I have felt more and more, over the years, a sense of guilt or regret after masturbation. This happens more often when I ejaculate. When I masturbate and have a dry orgasm, this does not happen.
The explanation for this timing is that horniness is a very strong instinct and can suppress feelings of guilt but as you cum hormones are released that temporarily suppress the horniness (and give rise to the refractory period) and that allows the feelings of guilt to resurface.
I think it is important to get to the bottom of the guilt feelings. You mention porn as one possible cause. Have you worked how it could be a cause? Do you have religious beliefs that prohibit porn? or are you worried that the things you watch in porn are things you would not actually want to do in practice? In the same way that you can dream of non-sexual things you don't actually want to do, so you can fantasise sexually about things you would never do in practice and porn is more about fantasy than reality. You can also try fantasising directly, i.e. without the porn as a trigger.
Always think: a 28 year old guy needs to masturbate? Am I wasting money, energy and time?
Why wasting money? As the joke goes, "your hand doesn't cost you dinner". Seriously, there is nothing wrong with having "me time" whether you spend it on a hobby or masturbating. There also isn't an age when you are supposed to "grow out of it". I still masturbate plenty and I am 48 and married and I have loved doing it every since I discovered it. I don't shoot quite as much or as far as when I was 18 but it still feels amazing. Even by 18 I had discovered that the sensation of nearly cumming was great and, unlike cumming itself, that feeling could be extended for quite some time before finally going over the edge. Now, I spend even more time enjoying the journey, though obviously I still love to cum too.
Do you feel that you should be doing something with a partner instead? I think it is important to get rid of any idea that masturbation is for boys and that "real men fuck" or that there is any obligation either to breed or even share you sexuality with anyone else. On the other hand, if you think those things will make you happier then go for it.