I think Dally chooses to die as he has lost Johnny: the only person he really cared about. Dally had made Johnny's safety and well being a crusade. He wanted Johnny to be safe and not to become as tortured and embittered as he was. Once Johnny is dead, Dally has no purpose or direction in his life.
I find the idea of Dally's death being 'gallant' questionable. The police officers are forced into killing him which would be a traumatic experience. That said, Dally treated all life as if it were a battle, and he dies challenging the enemy on his battlefield--the streets.