01 - how do I calculate the balance ?
You will need to scan the entire blockchain and look for outputs that send coins to your addresses and inputs that spend outputs that sent coins to your addresses. For each output, you add its value. For each input, you subtract the value of the output it spends.
With a Bitcoin Core based software such as Bitcoin ABC, you would have to import every single address that you derived into the wallet so that it can scan the blockchain and perform this task for you. Otherwise you will need to use some other software that works on top of your node which can perform this task. Bitcoin Core based software cannot do this automatically for you without adding the addresses to a wallet. Furthermore, you cannot import the xpub itself into Bitcoin Core based software, you will need to import each address individually.
02 - do I need to combine the external and internal unspent amount ?
Of course.