In Vanilla Sky David commits suicide because he is suffering constant pain and depression following his disfigurement. So In the end David chooses to be awakened in this future. So my question is: How did David come back to life for choosing dreams?
There's a plot twist that you might have missed.
After the club night where David passes out on the street, he goes and signs a contract with the company Life Extension to be frozen after his death. That is revealed later (full synopsis here) when:
The Support Technician explains that the Lucid Dream was "spliced" into his memories at the point where he passed out on the sidewalk after his night out with Sofia and Brian.
So he committed suicide but that doesn't mean he permanently died - he would need to be alive to be kept in the cryogenic suspension. An emergency rescue team probably applied first aid procedures and brought him back to life before freezing him.