Provided it is being used in your game, the optional rule on Simultaneous Effects from Xanathar's Guide to Everything lets you choose the order (if you are wearing the Periapt before your attunement ends)
This rule states:
Most effects in the game happen in succession, following an order set by the rules or the DM. In rare cases, effects can happen at the same time, especially at the start or end of a creature's turn. If two or more things happen at the same time on a character or monster's turn, the person at the game table - whether player or DM - who controls that creature decides the order in which those things happen.
It's clear from the first sentence that non-simultaneous effects are determined either by the rules, or by the DM.
It's clear from the second sentence of the rule, that it covers both simultaneous events in combat and out of combat, otherwise it wouldn't include the caveat:
[...] especially at the start or end of a creature's turn.
As a result, we should interpret the rule in that more generous light.
It's also worth pointing to the PHB rules on tracking time (emphasis mine):
In combat and other fast-paced situations, the game relies on rounds, a 6 second span of time described in chapter 9, "Combat.".
So, from this it's clear that if we need to track simultaneous, or other slower but still fast-paced effects, we should be using rounds to track time and resolve these things.
So, if an effect is actually simultaneous with another, then we should be looking at rounds and (if necessary within rounds) turns to determine when the simultaneous effect actually happens. Then we apply the optional rule from XGtE to resolve the conflict.
Are these effects actually simultaneous?
You have quoted (most of) the relevant rules for the features we need to look at. I will quote all of them here for clarity:
The rules on Short Resting state:
A character can spend one or more hit dice at the end of a short rest, up to the character’s maximum number of hit dice, which is equal to the character’s level.
The rules on attuning to an item state:
Attuning to an item requires a creature to spend a short rest focused on only that item while being in physical contact with it (this can’t be the same short rest used to learn the item’s properties). This focus can take the form of weapon practice (for a weapon), meditation (for a wondrous item), or some other appropriate activity. [...] at the end of the short rest, the creature gains an intuitive understanding of how to activate any magical properties of the item, including any necessary command words.
Based on these two sets of rules, both the attunement and your rolling of hit dice for that short rest are simultaneous events.
We should also consider if the specific magic item modifies any of this logic (since magic is one of the primary sources for specific exceptions in the game).
Periapt of Wound Closure states:
While you wear this pendant, you stabilise whenever you are dying at the start of your turn. In addition, whenever you roll a Hit Die to regain hit points, double the number of hit points it restores.
So, provided you attuned to the item, during your short rest, and were wearing it before the short rest and your attunement ended, then yes, the simultaneous events rule from XGtE would apply (if it is being used in your game) to the rolling of hit dice and having the attunement to, and therefore doubling apply from, the Periapt.
Since both attunement and healing are determined at the end of a short rest, and they happen to the character, it's very reasonable to conclude that these are in fact simultaneous effects that happen on the character's turn. Therefore we should conclude that the character gets to determine the order.
There is of course, one important caveat to this, as mentioned above; the Periapt of Wound Closure requires you to be wearing it in order for you to gain its effects. You aren't, however, required to wear it in order to attune to it. So if your character is simply touching it to attune as someone else is wearing it, then no, your character doesn't gain the benefits of the Periapt.