The object, the intention, and the circumstances make up the three "sources" of the morality of human acts.
CCC 1761
The object chosen morally specifies the act of willing accordingly as reason recognizes and judges it good or evil.
"An evil action cannot be justified by reference to a good intention" (cf St. Thomas Aquinas, Dec. praec. 6). the end does not justify the means.
A morally good act requires the goodness of its object, of its end, and of its circumstances together.
There are concrete acts that it is always wrong to choose, because their choice entails a disorder of the will, i.e., a moral evil. One may not do evil so that good may result from it.
The Morality of the Passions
The human person is ordered to beatitude by his deliberate acts: the passions or feelings he experiences can dispose him to it and contribute to it.
The term "passions" belongs to the Christian patrimony. Feelings or passions are emotions or movements of the sensitive appetite that incline us to act or not to act in regard to something felt or imagined to be good or evil.
The passions are natural components of the human psyche; they form the passageway and ensure the connection between the life of the senses and the life of the mind. Our Lord called man's heart the source from which the passions spring (Cf. Mk 7:21).
There are many passions. the most fundamental passion is love, aroused by the attraction of the good. Love causes a desire for the absent good and the hope of obtaining it; this movement finds completion in the pleasure and joy of the good possessed. the apprehension of evil causes hatred, aversion, and fear of the impending evil; this movement ends in sadness at some present evil, or in the anger that resists it.