Sorry to hear that you self-harmed, the after-regret can suck!
In terms of moving forward, how do you feel about telling your partner about what has happened? I know you've said you think you can hide it, but maybe telling them (unsure of pronouns?) would be useful in terms of giving you some support and also a bit of accountability as they'll know to be a bit more attentive to things and that might be helpful to prevent this becoming a proper old relapse.
It sounds like you've already identified some triggers that led up to it- is there anything that would help you to persuade yourself to go to sleep in the future?
It seems pertinent to share a link to a song that helped me through difficult times, that was linked to me many years ago by a certain member of this site...
https://www.youtube.com/watch?v=Nan4Kdtz-9w