The clues are "ubi" means "where" and "ibi" means "there."
I am going to do my best to translate over here, because the teaching is that good!
Johann Gerhard, Meditationes Sacrae
Fundamentum et principum sanctae vitae est salutaris poenitentia.
Ubi enim vera poenitentia, ibi remissio peccatorum;
ubi peccatorum remission, ibi gratia Dei;
ubi gratia Dei, ibi Christus;
ubi Christus, ibi ipsius meritum;
ubi Christus meritum, ibi satisfactio pro peccatis;
ubi satisfactio pro peccatis, ibi justitia;
ubi justitia, ibi laeta et tranquilla conscientia;
ubi tranquillitas conscientiae, ibi spiritus sanctus;
ubi spiritus sanctus, ibi tota sacrosancta trinitas;
ubi sancta trinitas, ibi vita aetern
Part 3: The Fruits of True and Sincere Repentence.
Johann Gerhard, Sacred Meditations
The fundamental principle of the holy life is healthy repentance.
Where there is true repentance, there is forgiveness of sins.
Where there is forgiveness of sins, there is the grace of God.
Where there is the grace of God, there is Christ.
Where there is Christ, there is His merit.
Where there is His merit, there is satisfaction for sin.
Where there is satisfaction for sin, there is justification.
Where there is justification, there is a joyful and tranquil conscience.
Where there is tranquility of conscience, there is the Holy Spirit.
Where there is the Holy Spirit, there is the entire divine Holy Trinity.
Where there is the Holy Trinity, there is eternal life.
When in the hour of deepest need
We know not where to look for aid;
When days and nights of anxious thought
No help or counsel yet have brought,
Then is our comfort this alone
That we may meet before Your throne;
To You, O faithful God, we cry
For rescue in our misery.
For You have promised, Lord, to heed
Your children's cries in time of need
Through Him whose name alone is great,
Our Savior and our advocate.
And so we come, O God, today
And all our woes before You lay;
For sorely tried, cast down, we stand,
Perplexed by fears on ev'ry hand.
O from our sins, Lord, turn Your face;
Absolve us through Your boundless grace.
Be with us in our anguish still;
Free us at last from ev'ry ill.
So we with all our hearts each day
To You our glad thanksgiving pay,
Then walk obedient to Your Word,
And now and ever praise You, Lord.
Text: Paul Eber
Translation: Catherine Winkworth, alt.
Wenn wir in höchsten Nöten sein
JS Bach, BWV 641