Quran 3:154 says that after the distress Allah sent security as drowsiness over a party of them. Quran 3:155 says that those who turned back were made to slip by Satan because of something they had earned, "but Allah has already forgiven them". It also reminds them that they had struck the enemy twice as much at Badr (3:165), and that what happened was by Allah's permission to make the believers known (3:166).
Allah comforted them: "Do not weaken and do not grieve, and you will be superior if you are believers" (3:139). He said that wounds touch the other side too, and He alternates these days among people (3:140). Quran 3:169-171 says not to think of those killed in the cause of Allah as dead, but as alive with their Lord, receiving provision.
One of them was Hamza ibn Abd al-Muttalib (may Allah be pleased with him), the Prophet's ﷺ uncle. Wahshi, who killed him, later told in Sahih al-Bukhari (4072) how he did it, and that he came to the Prophet ﷺ, who asked him to keep his face away. After the Prophet's ﷺ death, Wahshi went out against Musaylima the Liar and struck him with his spear, hoping to make up for Hamza.
Quran 3:172-174 praises those who responded to Allah and the Messenger after being wounded. When told that people had gathered against them, it increased their faith, and they said, "Sufficient for us is Allah, and He is the best Disposer of affairs." Some commentators relate these verses to the day after Uhud.