So, I know the proof for Halting Problem is not recursive using diagonalization. We prove it using proof by contradiction. First we assume HP is recursive which implies there is a Total Turing Machine. And prove it is not possible by contradiction.
But the proof just says Halting Problem is not recursive. It doesn't say Halting Problem is recursive enumerable.
So how to prove Halting Problem is recursive enumerable
The key words in the above definition is "string not in the language ", so now if one has a computable function to accept all the valid strings , which in the context of the question would be all computable functions, then the HP is recursively enumerable.
One such algorithm is already mentioned in the comments by Peter under the question... Which is to run every possible program, and register all the halting ones.
It guarantees to find 'all' the computable functions eventually, and rejecting or looping 'only' on non-computable functions.
AND with the above logic the recursive enumerability of the diagonal language can't be inferred. Since any computable function deciding the valid strings will enter a infinite loop at $ x=D $ i.e. the diagonal language's own number, since any computable function must accept the symbol at $ x=D $, cuz its a valid string in the diagonal language , to make it recursively enumerable, but no such function exists ,therefore the diagonal language is not recursively enumerable.