I have been looking at baseitems.2da and feel a bit confused: how could one change the damage type of lightsabers so that rather than being only Energy is Energy + Slashing?

to give a double-bladed lightsaber a damage formula like this "2d8/2d8" what should I have to do? 4d8 or, being a 2-handed weapon, by default it tries to inflict 2 hits, and therefore I only need to set it to 2d8?

double sabres are a bit of a weird one for suspension of disbelief in a gaming system.

in d6 they have mostly parrying benefits and are useful for taking on more than one opponent of equivalent skill, since generally speaking anyone who gets hit by any kind of lightsabre is cut in half by one hit.
But it's a completely different combat system whereby you have to overcome the elective combat skill of your opponent to score that hit (skill versus parry rolls with skill points assigned by the player and awarded for quest completion). Number of attacks are up to you but each drains a skill dice if you don't space them between rounds, so effectively higher skill warriors can afford to take more actions/round.

in d20 it's all out the window and lightsabres do finite damage in a combat blow, whilst to hit rates are finite by class/level (with minor circumstantial adjustments), and finite armour classes by class/equipment. Number of attacks are static by level and varied actions are restricted between combat rounds.

So where is the funky nature of having a double-bladed lightsabre in d20 we ask? Well it gives an extra attack bonus as per the balanced off-hand weapon rule, and does a little extra damage for a successful attack.

It's important to understand how the d20 combat system works to understand this about lightsabre damage. I mean why doesn't a weapon that can slice through a starship hull cut a sithie in half with one stroke? The answer is that it does, but a hit is not a literal full force hit in d20 (it is in d6).

d20 combat is from the old D&D system where a single dice roll scoring a hit represents in fact, ducking and parrying, sidestepping and wearing your opponent rather than actually striking him squarely. Vitality points or hit points are not biological health but represent psychological fighting ability as well as physical well being, this is why they go up with level advancement (when you're not actually physically different, you just become a more advanced opponent and harder to wear out).

So lightsabre damage in d20 really represents the amount of wear consistently gaining minor combat footing advantages has upon your opponent. And if you win the psychological battle, the final blow which takes the last of his VP cuts him in half or takes a limb or something, and is actually the first time you squarely hit your opponent.

So the double bladed lightsabre is more imposing when handled with equal skill to a single bladed one, and gets that extra surprise attack.

It is also an energy weapon for damage purposes against armour and materials, it does not do slashing damage.

all of that is fine, and thanks. but there is still no answer if the second damage type (slashing) can be added, and if to get that formula effect there's something particular I should do in 2da editing or it automatically does it.

tsl has the double blade ls do 2d12 per successful hit roll and gives an extra attack as a balanced offhand wpn, the weapon type is melee for combat purposes and energy for damage resistance purposes (ie. item properties).
If you wanted to add slashing damage I suppose you could edit the uti and baseitems, reduce baseitems damage to only one base die and add bonus slashing damage of the same die in the uti.

short of rescripting a whole new game shell, not sure what you're asking?

If you wanted to add slashing damage to lightsabers, I would suggest that you edit the .uti files and add a damage type bonus of slashing with a certain die roll and setting it to be added without having to upgrade the weapon.