Single engine failure in a light twin after lift-off: what to do?
What you really should learn by heart is the flight speed for best climb with one engine inoperative. Try to trim that immediately and you will win more time to make a decision. The rest is really depending on circumstances: Is there a landing opportunity ahead? Are you high enough to do a 180 and land on the same runway in opposite direction? Or are you high enough (and the aircraft does not lose altitude) that you can fly a pattern and land normally?

Testing the aircraft at altitude with one engine throttled is highly recommended, but be aware that the remaining thrust / drag of the throttled engine might be different from that of the stopped engine.