However, I feel uncomfortable with the fact that all my HTML resides in PHP function (“control_panel_page”).
Why are you uncomfortable with that? A huge percentage of your site’s HTML is in some PHP function or another. That is a big part of the “why” of using PHP.
No, you cannot point that to a file. It needs to be a callback function. You can extract your code to a file and then do something like:
control_panel_page() {
include('control_panel_file.php');
}
But there is no reason to do that unless you think it makes the code easier to maintain, which it does, sometimes, with large and complex pages.