In that scene, the reason why Harry used the septum sempra spell was because Draco was about to cast the cruciatus curse. In the movie, it seemed that Harry did it because Draco was his enemy, and then Harry fled the scene after Snape arrived. It seemed more like Harry wanted Draco killed than Harry doing it out of self defense or tit for tat on curses.
Spoiler
And that's wrong, worse and stupid. It was supposed to be because they were desperately battling, like you said. Harry was desperate for a counter, had read about Sectumsempra and used it having no idea what it would do (just "for enemies"). When he saw the horror it unleashed, he felt great remorse and even fear and confusion (he trusted the book before). That wasn't felt at all in the movie, nor was Snape's going crazy over Harry using one of his spells from his old book. And then Harry absolutely didn't want Snape seeing the book, so he did the switch and was able to hide it because the room sensed his desperation (also done worse in movie...and with Ginny. lolwat).