Yes, you must Evade a monster to take any other action than Attack, it doesn't matter if you succeeded in your attack. From the rules (page 9, 14, and 15).
Attacking a monster is the only action that an investigator can perform while a monster is in his space (unless he evades the monster, see “Evade Tests” on page 14).
An investigator must make an evade test against every monster in his space before moving or performing non-attack actions. [...] Regardless of whether he passes or fails, the investigator may then move or perform the intended action. After having attempted to evade a monster, the investigator may freely move and take actions without having to try to evade the same monster that turn. [...] Attacking a monster does not require making an evade test. This attack may be unarmed, with a weapon, or with an “attack” Spell card. This attack does not need to target a monster in the investigator’s space.
Stunned monsters do not need to be evaded.
Q: Do stunned monsters cause evade checks? What about horror checks? Can they take samples?
A: Investigators can freely evade stunned monsters (because they cannot attack). Stunned monsters still cause Horror checks and can still take samples (although they are not moved after taking the sample).