What are the differences between an epic hero and a tragic hero?
At the risk of stating the obvious, the first difference is one of genre: an epic hero is the central figure of an epic poem (e.g., The Gilgamesh Epic, Iliad, Odyssey, Aeneid), whereas a tragic hero is the central figure in a tragic play (e.g., Oedipus the King, Hippolytus, Macbeth).
The next difference has to do with the point at which we encounter the hero along the path of his or her life. When Homer's Iliad ends, Achilles is on an upward trajectory. He has killed Hector, thus avenging the death of his friend Patroclus, and he has restored his position of honor with the Greek army. Likewise, Odysseus, at the end of the Odyssey, returns home, kills the suitors, and is reunited with his wife.
In contrast, the lives of tragic heroes are typically on a downward trajectory at the end of the plays in which they appear. They are people who are in a state of misfortune when we take our last look at them on the stage.
One of the most famous definitions of the tragic hero is found in the thirteenth chapter of Aristotle's Poetics:
There remains, then, the character between these two extremes — that of a man who is not eminently good and just, yet whose misfortune is brought about not by vice or depravity, but by some error or frailty. He must be one who is highly renowned and prosperous — a personage like Oedipus, Thyestes, or other illustrious men of such families.
Thus, unlike Odysseus, who is restored to fortune at the conclusion of the Odyssey, a character like Oedipus has lost everything at the end of Sophocles' play (his kingship, his wife, his children, etc.). Likewise, Macbeth, just before he is killed, realizes that he interpreted the witches' words incorrectly.
Of course, at the end of Beowulf, the title character has died, but he has died after a glorious battle in which the dragon is killed and his funeral is conducted amid tales of Beowulf's glorious deeds.