With this blueprint I ensure that when I hit the collision box of the door, the widget appears on the door handle.
I would like to have this in the player controller blueprint so that I ensure that when I die and respawn the widget still works, which it does not do now.
my question is how exactly should I do that in connection with the Component overlap functions?
You might just need to reset the player variable when you respawn. The other option would be to put a tag on the player blueprint and check that instead of comparing “other” to a variable. Depending on how you have set the respawn you are likely destroying and recreating a new player pawn which will no longer be the same one you set at beginplay.
I largely agree with what @Dark-Mithril has described.
I think this functionality makes sense to remain in the Door Actor, you risk having a huge monolithic Player Controller otherwise.
I also agree that the reference you grab on begin play is probably no longer valid. What I would instead recommend is when you have an overlap, grab the Other Actor and check its class. If the class is of your Player Character class then you know the player character has overlapped, and you don’t need to hold a reference to the player at all.
You could take this a step further and add some kind of interface to the player character, e.g. DoorOpenerInterface, and check of the Other Actor implements the interface on overlap. This has some advantages where you may want multiple types of objects to be able to open doors, and they may have different functionality they want to trigger when they try open the door, e.g. an open door animation.