Estraven commits suicide because he is out of other options.
It's a cultural taboo for Estraven to commit suicide; he does it because he sees no other way out. By the time he rushes toward the guards at the border, his death is the only way that he can see a meaningful future for anyone. He is trapped, and though he could have avoided the guard, giving up his future meant giving his friend a better chance at completing his mission.
Tibe, the Prime Minister of Karhide, hates Estraven. He won't stop his campaign against him until he's defeated. By killing himself, Estraven removes Tibe's opposition to him and makes it easier for Genly to do what he needs to do. His death allows Genly to convince Karhide to join the Ekumen. If he had stayed alive, it's unlikely that he would have been able to complete his mission.
When Estraven tried to barter territory to Karhide's enemies, he was putting his planet over his country. When he killed himself, he was putting the future of his planet over himself. Despite knowing that it would kill his legacy to commit suicide, he did it because he was out of other options and believed that it would help make the world into a better place.