For TNG, I would have to go with "Yesterdays Enterprise". Capt Rachel Garrett commanding the Enterprise-C got thrown from the proper timeline which was in 2344 and got thrown into 2366 and away from a battle they were involved in defending a Klingon outpost against a Romulan attack.
Upon appearing in 2366 they find out that the Federation is losing a war against the Klingons, and that had they now been thrown from the proper timeline, this war would never had existed. Capt Garrett is killed in this battle, and the crew realizing that the only way to restore the timeline is to go back to 2344 and to a certain death.
The First Officer LT Castillo takes command, and Enterprise-D Officer Tasha Yar volunteers to go back to help, knowing full well this is a suicide mission. This is Star Trek at it's best...
Upon appearing in 2366 they find out that the Federation is losing a war against the Klingons, and that had they now been thrown from the proper timeline, this war would never had existed. Capt Garrett is killed in this battle, and the crew realizing that the only way to restore the timeline is to go back to 2344 and to a certain death.
The First Officer LT Castillo takes command, and Enterprise-D Officer Tasha Yar volunteers to go back to help, knowing full well this is a suicide mission. This is Star Trek at it's best...