If the spell ends during your turn, you cannot take damage from it at the end of your turn.
The rules for concentration state:
Some spells require you to maintain concentration in order to keep their magic active. If you lose concentration, such a spell ends.
If your attack causes the target to lose concentration on the spell, the spell ends immediately, which is before the end of your turn. Since the spell ended before the end of your turn, it is not around to damage you at the end of your turn.
Your turn isn't over until you say it's over.
This is not explicitly stated in the rules, but there is always activity that can take place between using your action and the end of your turn. In the rules for "Your Turn", we see:
Other Activity on Your Turn
Your turn can include a variety of flourishes that require neither your action nor your move.
You can communicate however you are able, through brief utterances and gestures, as you take your turn.
Since you could always do something included here after your action, your turn does not end until you decide there is nothing else you intend to do.