So you married the wrong person, even though you made istikhara and you were certain that this was the right decision for you.
Yes it can bring you pain and it can leave you hurt and heart broken. However, you need to trust Allah. Allah knows best as to why this marriage didn’t work out the way you planned.
Always trust in Allah no matter what happens. It maybe that a bad thing happens to you but it is actually good for you. Allah knows best. Beautiful reminder.