I have a bug in most of my trees here (mostly mango, longan but also others).
It looks like it's eating the heart wood of the tree and eventually the branches die and fall off. On most of my trees I have branches that have withered and when I break them off they are hollow inside.
Do anyone know what bug I am dealing with? And if there is anything that I can do?
The bug is spreading.
I have attached a few photos - please let me know if there are other photos that could help identity.
Looks like a borer of some sort. These are usually the larval stage of a beetle or sometimes a moth. Whenever you notice the frass (the crumbly mess of chewed wood and droppings) on a branch, poke a piece of skinny wire into the hole as far as you can. When you pull it out, hopefully you will see the impaled remains of a larva. Wash the hole out as much as you can and then seal it with a paste made from clay and manure.
I don't know of environmentally friendly ways to discourage borers beyond careful pruning and vigilance. Open wounds are a major entry point for some types, so cleaning up broken branches can be important. You could also plant sacrifice trees to attract the adult females to lay their eggs there instead or your fruit trees. Look at the native vegetation and see what appears to host lots of borer to choose a sacrificial species.