When you find yourself trying to remember a show (or any works) that's on the tip of your tongue but just out of reach, come here - the collective brain of the TVTropes community can probably help. Post all the details you can remember (examples help). If you're looking for a trope, head over to Trope Finder. Have general questions about tropes? Visit Ask The Tropers!
Sounds like a version of the story An Occurrence at Owl Creek Bridge, by Ambrose Bierce.
There was a short film version of it that aired as an episode of the original The Twilight Zone (1959). Could that have been it?
Occurrence at Owl Creek Bridge (1961) La rivière du hibou (original title) Not Rated | 28min | Short, Adventure, Drama | December 1961 (France) In 1862, during the American Civil War, a Southern civilian is about to be hanged for attempting to sabotage a railway bridge. When the execution takes place from the bridge, the rope breaks and he begins his escape toward home.
Hey, Sayori, wanna hang out?

My uncle saw a foreign movie a long time ago. He's searching for it ever since. In the movie, the main character joins the army during war (most probably WW 2). In a battle he is captured and taken prisoner by the enemy. It was decided that the guy was to be hanged in a bridge on a river. Them the movie goes to flashback. The hero met a girl. They fall in love. Then there was a wedding. As the hero was about to kiss the bride, the hero is executed and the screen cut to black.