I understand how Arwen gave up an immortal life for Aragorn but I don't understand why she was dying because of the evil from Mordor. Can anyone explain?
In the book, she wasn't dying. She made the choice to be mortal, but 'It was not her lot to die until she lost all that she had gained', as written in the story of Arwen and Aragon in ROTK appendices. My guess is that Peter Jackson decided to make that into the trigger for Aragorn to claim his birthright.
The logic is that Arwen chose to be mortal but she was not tied to Aragorn yet cos of the War. So since she had nothing to keep her alive, she was dying. It was maybe the only thing that would've spurred Aragorn to claim his birthright and take the Dimholt road. Again, this does not tie with the events of the book.
In the book, Aragorn was already willing to claim his kingship. He was just waiting for the right time. Thus, Arwen merely had to wait for Aragorn to claim his kingship and marry her. But in the movie, he was reluctant to be king. It was Elrond's plea because Arwen was dying that drove him.
In movieverse, the 'evil that spreads from Mordor' was in some way affecting the Elves. They were becoming weaker and they felt threatened. But all the Elves had 'the life of the Eldar', so they were protected. Once Arwen renounced her immortality, 'the life of the Eldar left her' as Elrond said. So she was affected even more. And began to die.