Passenger dies just after takeoff?
A great many passengers travel accompanied. So grieving wife/husband etc?
Just after takeoff, I'm sure the majority of pax would understand a return. I'm equally sure many would question carrying on. So potentially a lot of additional problems later, especially for the cabin crew.
The only immediately governing factors to negate a return would be flight safety and weather.
Overweight landing. Not a major problem. You would do it for a great many technical reasons. Operate the aircraft normally.
Who is qualified to say the pax is actually dead? Unless there is a doctor sat next to the passenger at the time, then you are unlikely to have identified any medical personnel travelling. Assuming they own up.