I would say you are on the right path by describing it as an error by a righteous man. The Biblical author is describing the situation but not necessarily praising the action. Let’s look at the passage further:
…Razis, now caught on all sides, turned his sword against himself, preferring to die nobly rather than fall into the hands of vile men and suffer outrages unworthy of his noble birth. In the excitement of the struggle he failed to strike exactly. So while the troops rushed in through the doors, he gallantly ran up to the top of the wall and courageously threw himself down into the crowd. But as they quickly drew back and left an opening, he fell into the middle of the empty space. Still breathing, and inflamed with anger, he got up and ran through the crowd, with blood gushing from his frightful wounds. Then, standing on a steep rock, as he lost the last of his blood, he tore out his entrails and flung them with both hands into the crowd, calling upon the Lord of life and of spirit to give these back to him again. Such was the manner of his death.
The Biblical author ascribes the motive of Razis as wanting a noble death, but in the end simply says “such was the manner of his death.” Note that the author does not seem to show any agreement that his death was more noble than had he been slain.
Secondly, the author says that Razis wanted to fall on his sword as a noble death yet that is not what happened. Razis missed his sword, then tried to throw himself off a wall but survived that and ended up running through a crowd while he ripped out his own entrails. Its more a description of a comedic failure than nobility, more irony than praiseworthy.
The full context does not lend itself to a praising of suicide in any manner or form.